/* nx-legal.css — uusi ulkoasu ehtosivuille (/tos/, /privacy/, /kayttoehdot/). Ei koske <main>-elementin sisältöä. */
/* Layout: split hero (copy left, photo right) like /poistopalvelu/, then alternating
   white and black bands: services, steps, price examples, FAQ, closing CTA stripe.
   Tokens copied by value from movingfirm-frontend/home.css. */
:root {
    --paper: #ffffff;
    --paper-dim: #f4f4f1;
    --ink: #0a0a0a;
    --mint: oklch(0.80 0.17 162);
    --mint-deep: oklch(0.50 0.15 162);
    --text-dim: rgba(255, 255, 255, .55);
    --text-dim-ink: rgba(10, 10, 10, .6);
    --line: rgba(10, 10, 10, .12);
    --line-light: rgba(255, 255, 255, .16);
    --dark-grad: linear-gradient(155deg, #040404 0%, #151515 45%, #050505 100%);
    --font-display: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
    --font-body: 'Public Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --ease: cubic-bezier(.22, 1, .36, 1);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }

body {
    background: var(--ink); color: var(--paper);
    font-family: var(--font-body); font-weight: 300; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
    z-index: 10; background: var(--ink);
}
a { color: var(--mint); text-decoration: none }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px }
em { font-style: italic; color: var(--mint) }

.gutter {
    width: 100%; max-width: 1400px; margin: 0 auto;
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}
@media (min-width: 700px) { .gutter { padding-left: max(2.5rem, env(safe-area-inset-left, 0px)); padding-right: max(2.5rem, env(safe-area-inset-right, 0px)) } }
@media (min-width: 1200px) { .gutter { padding-left: max(5rem, env(safe-area-inset-left, 0px)); padding-right: max(5rem, env(safe-area-inset-right, 0px)) } }

.label {
    font-family: var(--font-mono); font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
    display: flex; align-items: center; gap: .9rem; color: var(--mint-deep);
}
.label::after { content: ''; flex: 1; height: 1px; background: var(--line) }
.on-ink .label { color: var(--mint) }
.on-ink .label::after { background: var(--line-light) }
.heading {
    font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; line-height: 1.02;
    font-size: clamp(2rem, 4vw, 3.2rem); text-wrap: balance; margin-top: 1.6rem;
}
.on-white .heading em { color: var(--mint-deep) }
.section { padding-block: clamp(4rem, 8vw, 6.5rem) }
.on-white { background: var(--paper); color: var(--ink) }
.on-ink { background: var(--dark-grad); color: var(--paper) }

/* ── Nav ── */
nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--ink); border-bottom: 2px solid var(--paper) }
nav .gutter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem }
.nav-logo { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--paper); display: flex; align-items: center; gap: .6rem }
.nav-logo img { width: 34px; height: 34px }
.nav-logo .n365 { color: var(--mint) }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1.8rem; list-style: none }
.nav-links a {
    font-family: var(--font-mono); font-size: .68rem; font-weight: 500; letter-spacing: .05em;
    color: var(--mint); white-space: nowrap; padding: .5rem .1rem; display: inline-flex;
    border-bottom: 2px solid transparent; transition: border-color .25s var(--ease), color .25s var(--ease);
}
.nav-links a:hover { border-bottom-color: var(--mint) }
.nav-links a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--paper) }
.nav-links a.nav-cta { font-weight: 700; border-bottom-color: var(--mint) }
@media (max-width: 640px) {
    .nav-links { width: 100%; justify-content: space-between; gap: .2rem .8rem }
    .nav-links a { font-size: .64rem; letter-spacing: .02em }
}

/* ── Hero: split, photo right ── */
.hero { display: grid; grid-template-columns: 1fr 1fr; background: var(--dark-grad); min-height: min(88vh, 860px) }
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 1.8rem; padding-block: clamp(3.5rem, 7vw, 5.5rem); min-width: 0 }
.hero-copy.gutter { max-width: 700px; margin: 0 0 0 auto }
.hero-tab {
    align-self: flex-start; display: inline-flex; align-items: center; gap: .7rem;
    font-family: var(--font-mono); font-size: .76rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--mint);
    border-top: 2px solid var(--mint); border-bottom: 2px solid var(--mint); padding: .6rem 0;
}
h1 {
    font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
    font-size: clamp(2.8rem, 5.4vw, 4.6rem); line-height: .95; letter-spacing: -.02em;
}
h1 em { display: block }
.hero-lead { font-size: 1.08rem; line-height: 1.6; color: rgba(255, 255, 255, .85); max-width: 46ch }
.checks { list-style: none; display: flex; flex-direction: column; gap: .7rem }
.checks { gap: .85rem }
.checks li { display: flex; align-items: center; gap: .9rem; font-weight: 600; font-size: 1.02rem; color: var(--paper) }
.checks li::before {
    content: ''; flex: 0 0 auto; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    border: 1.5px solid var(--mint);
    background: color-mix(in oklab, var(--mint) 14%, transparent)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323dc9b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.2 4.2L18.5 7.8'/%3E%3C/svg%3E")
        center / 62% no-repeat;
}
.hero-actions { display: flex; flex-wrap: nowrap; gap: .75rem }
.hero-actions .btn { justify-content: center; text-align: center }
@media (max-width: 520px) {
    .hero-actions .btn { flex: 1 1 0; min-width: 0; padding: 1rem .7rem; font-size: .72rem; letter-spacing: .02em; line-height: 1.3 }
}
.btn {
    font-family: var(--font-mono); font-size: .82rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
    padding: 1.1rem 1.7rem; display: inline-flex; align-items: center; gap: .6rem; border: 2px solid var(--mint);
    transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-primary { background: var(--mint); color: var(--ink) }
.btn-primary:hover { transform: translateY(-2px); color: var(--ink) }
.btn-secondary { background: transparent; color: var(--paper); border-color: var(--line-light) }
.btn-secondary:hover { border-color: var(--mint); color: var(--mint) }
.hero-note {
    align-self: flex-start; display: flex; flex-direction: column; gap: .45rem;
    padding: 1rem 1.4rem; border: 1px solid var(--line-light); background: rgba(255, 255, 255, .04);
}
.hero-note .k {
    font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--mint);
}
.hero-note .v {
    font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; line-height: 1.1; color: var(--paper);
}
.hero-note .v b { font-weight: 800; color: var(--mint) }
.hero-photo { position: relative; min-height: 22rem; overflow: hidden }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 35% }
.hero-photo::before {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg, #070707 0%, rgba(7, 7, 7, 0) 22%);
}
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; min-height: 0 }
    .hero-copy.gutter { max-width: none; margin: 0 }
    .hero-photo { order: -1; height: 46vw; min-height: 15rem }
    .hero-photo::before { background: linear-gradient(0deg, #070707 0%, rgba(7, 7, 7, 0) 40%) }
}

/* ── Facts strip ── */
.facts { background: var(--mint); color: var(--ink) }
.facts ul { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: 1.3rem }
.facts li { display: flex; flex-direction: column; gap: .25rem; padding-inline: 1.6rem; border-left: 1px solid rgba(10, 10, 10, .18); min-width: 0 }
.facts li:first-child { padding-left: 0; border-left: none }
.facts strong { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.15 }
.facts span { font-size: .84rem; font-weight: 400; color: rgba(10, 10, 10, .72); line-height: 1.35 }
@media (max-width: 900px) {
    .facts ul { grid-template-columns: 1fr 1fr; gap: 1.4rem 0 }
    .facts li:nth-child(odd) { padding-left: 0; border-left: none }
}

/* ── Services ── */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 3rem }
.service { background: var(--paper); padding: 2rem 1.6rem; display: flex; flex-direction: column; gap: .8rem; min-width: 0 }
.service .tag { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mint-deep) }
.service h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.15 }
.service p { font-size: .95rem; color: var(--text-dim-ink); line-height: 1.55 }
.service .phone { font-family: var(--font-mono); font-size: .85rem; color: var(--ink); font-weight: 500; user-select: all; margin-top: auto }
@media (max-width: 1000px) { .services { grid-template-columns: 1fr 1fr } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr } }

/* ── Steps ── */
.steps-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); margin-top: 3rem; align-items: stretch }
.steps-photo { position: relative; min-height: 20rem; overflow: hidden; border: 1px solid var(--line-light) }
.steps-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; filter: grayscale(.25) }
.steps { list-style: none; display: flex; flex-direction: column }
.step { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: baseline; padding-block: 1.5rem; border-top: 1px solid var(--line-light) }
.step:last-child { border-bottom: 1px solid var(--line-light) }
.step .num { font-family: var(--font-mono); font-size: .8rem; color: var(--mint) }
.step h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem }
.step p { color: var(--text-dim); font-size: .95rem; margin-top: .3rem }
.step .when {
    font-family: var(--font-mono); font-size: .74rem; font-weight: 500; letter-spacing: .02em; color: var(--mint); white-space: nowrap;
    padding: .3rem .75rem; border: 1px solid color-mix(in oklab, var(--mint) 45%, transparent); border-radius: 999px;
    background: color-mix(in oklab, var(--mint) 10%, transparent); justify-self: start;
}
@media (max-width: 900px) { .steps-grid { grid-template-columns: 1fr } .steps-photo { min-height: 16rem } }
@media (max-width: 480px) { .step { grid-template-columns: auto 1fr } .step .when { grid-column: 2 } }

/* ── Price examples ── */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3rem }
.price-card { border: 2px solid var(--ink); padding: 1.8rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0 }
.pc-tag { font-family: var(--font-mono); font-size: .76rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--mint-deep) }
.price-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.25 }
.pc-meta { font-size: .9rem; color: var(--text-dim-ink) }
.pc-rows { display: flex; flex-direction: column }
.pc-row { display: flex; justify-content: space-between; gap: 1rem; padding-block: .55rem; border-bottom: 1px solid var(--line); font-size: .92rem; font-variant-numeric: tabular-nums }
.pc-row.discount span:last-child { color: var(--mint-deep); font-weight: 600 }
.pc-row.sub, .pc-row.vat { color: var(--text-dim-ink) }
.pc-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; background: var(--ink); color: var(--paper); padding: 1rem 1.2rem; margin-top: auto }
.pc-total .k { font-family: var(--font-mono); font-size: .76rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--mint) }
.pc-total { flex-wrap: wrap }
.pc-total .v { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; font-variant-numeric: tabular-nums; white-space: nowrap }
.price-note {
    margin-top: 1.5rem; background: var(--paper-dim); border: 1px solid var(--line);
    padding: 1.5rem 1.8rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem 2.2rem;
}
.price-note h3 {
    font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; line-height: 1.1; letter-spacing: -.01em;
    color: var(--ink); white-space: nowrap;
}
.btn-dark { background: var(--ink); color: var(--mint); border-color: var(--ink); white-space: nowrap }
.btn-dark:hover { transform: translateY(-2px); color: var(--mint) }
.price-note p { font-size: 1rem; line-height: 1.55; color: rgba(10, 10, 10, .78); max-width: 62ch; min-width: 0 }
.price-note strong { font-weight: 600; color: var(--mint-deep) }
.price-note .btn { white-space: nowrap; justify-content: center }
@media (max-width: 1000px) { .price-note { grid-template-columns: 1fr auto } .price-note p { grid-column: 1 / -1; grid-row: 2 } .price-note .btn { grid-column: 1 / -1; justify-self: start } }
@media (max-width: 700px) { .price-note { grid-template-columns: 1fr } .price-note h3 { white-space: normal } .price-note .btn { justify-self: stretch } }
@media (max-width: 800px) { .price-grid { grid-template-columns: 1fr } }

/* ── FAQ ── */
.faq { margin-top: 2.5rem; border-top: 1px solid var(--line-light); max-width: 900px }
.faq details { border-bottom: 1px solid var(--line-light) }
.faq summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
    padding-block: 1.4rem; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}
.faq summary::-webkit-details-marker { display: none }
.faq summary::after { content: '+'; font-family: var(--font-mono); font-weight: 400; font-size: 1.4rem; color: var(--mint); flex: 0 0 auto; transition: transform .3s var(--ease) }
.faq details[open] summary::after { transform: rotate(45deg) }
.faq details p { color: rgba(255, 255, 255, .75); padding-bottom: 1.5rem; max-width: 65ch }
.faq-section .faq { border-top-color: var(--line) }
.faq-section .faq details { border-bottom-color: var(--line) }
.faq-section .faq summary::after { color: var(--mint-deep) }
.faq-section .faq details p { color: rgba(10, 10, 10, .75) }

/* ── Closing CTA + footer ── */
.cta-stripe { display: block; background: var(--mint); color: var(--ink) }
.cta-stripe:hover { color: var(--ink) }
.cta-stripe .gutter { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem 2.5rem; padding-block: 1.6rem }
.cs-text { font-family: var(--font-mono); font-weight: 500; font-size: clamp(1.05rem, 2vw, 1.4rem); text-transform: uppercase; letter-spacing: .02em }
.cs-text::before { content: '> '; color: rgba(10, 10, 10, .45) }
.btn-cs {
    background: var(--ink); color: var(--mint); font-family: var(--font-mono); font-size: .9rem; font-weight: 500;
    letter-spacing: .06em; text-transform: uppercase; padding: 1.15rem 2.2rem; display: inline-flex; gap: .6rem;
    transition: transform .3s var(--ease);
}
.cta-stripe:hover .btn-cs { transform: translateY(-2px) }
@media (max-width: 600px) { .cta-stripe .gutter { flex-direction: column; align-items: stretch } .btn-cs { justify-content: center } }
.deco-strip { height: 14px; background: repeating-linear-gradient(45deg, var(--mint) 0 3px, transparent 3px 21px); background-color: var(--ink) }
footer { background: var(--ink); border-top: 1px solid var(--line-light) }
footer .gutter {
    padding-block: 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between;
    font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; color: var(--text-dim);
}
footer .contact { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem }
footer .contact span { user-select: all; color: rgba(255, 255, 255, .8) }

@media (prefers-reduced-motion: reduce) { .btn, .btn-cs, .faq summary::after { transition: none } }

/* ── Friendlier small type: nav as pills ── */
.nav-links { gap: .25rem }
.nav-links a {
    font-family: var(--font-body); font-size: .92rem; font-weight: 600; letter-spacing: 0;
    color: rgba(255, 255, 255, .78); padding: .5rem .9rem; border-radius: 999px; border-bottom: 0;
    transition: background .25s var(--ease), color .25s var(--ease);
}
.nav-links a:hover { color: var(--paper); background: rgba(255, 255, 255, .09); border-bottom: 0 }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--mint) }
.nav-links a.nav-cta { color: var(--mint); box-shadow: inset 0 0 0 1.5px var(--mint); border-bottom: 0 }
.nav-links a.nav-cta:hover { color: var(--ink); background: var(--mint) }
@media (max-width: 640px) {
    .nav-links { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: .15rem; scrollbar-width: none; margin-inline: -.5rem ; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 2rem }
    .nav-links::-webkit-scrollbar { display: none }
    .nav-links a { font-size: .86rem; padding: .45rem .75rem }
}

/* ── Friendlier small type: hero tag and section labels ── */
.hero-tab {
    font-family: var(--font-body); font-size: .92rem; font-weight: 600; letter-spacing: 0; text-transform: none;
    color: var(--paper); border: 0; padding: .45rem 1rem .45rem .85rem; border-radius: 999px;
    background: rgba(255, 255, 255, .08); gap: .6rem;
}
.hero-tab::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); flex: 0 0 auto;
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--mint) 25%, transparent);
}
.label { font-family: var(--font-body); font-size: .95rem; font-weight: 700; letter-spacing: 0; text-transform: none }

/* ── Softer pass to match the homepage and booking form ── */
.btn { border-radius: 999px; padding-inline: 1.8rem }
.btn-secondary { border-width: 1.5px; background: rgba(255, 255, 255, .05) }
.hero-note { border: 0; border-radius: 16px; background: rgba(255, 255, 255, .07) }
.hero-photo { border-radius: 0 0 0 28px }
@media (max-width: 900px) { .hero-photo { border-radius: 0 0 24px 24px } }
.price-card { border: 0; border-radius: 22px; background: var(--paper-dim); padding: 1.8rem }
.pc-row { border-bottom-color: rgba(10, 10, 10, .08) }
.pc-total { border-radius: 14px }
.price-note { border: 0; border-radius: 22px; background: var(--paper-dim) }
.steps-photo { border: 0; border-radius: 22px }
.step { border-top-color: var(--line-light) }
.faq details { border-bottom-color: var(--line) }
.faq summary::after {
    width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem;
    background: color-mix(in oklab, var(--mint) 16%, transparent);
}
.btn-cs { border-radius: 999px }

.pc-tag, .pc-total .k, .hero-note .k, .step .when { font-family: var(--font-body); font-weight: 700; letter-spacing: 0; text-transform: none }
.pc-tag { font-size: .88rem }
.pc-total .k { font-size: .9rem }
.hero-note .k { font-size: .85rem }
.step .when { font-size: .8rem }
.cs-text { font-family: var(--font-display); font-weight: 800; text-transform: none; letter-spacing: -.01em; font-size: clamp(1.3rem, 2.4vw, 1.8rem) }
.cs-text::before { content: none }
.btn, .btn-cs { font-family: var(--font-body); font-weight: 700; letter-spacing: 0; text-transform: none; font-size: .98rem }

footer .gutter { font-family: var(--font-body); font-size: .85rem; letter-spacing: 0 }

/* Anchored sections land below the sticky nav */
section[id] { scroll-margin-top: 5.5rem }
@media (max-width: 640px) { section[id] { scroll-margin-top: 8.5rem } }

/* Nav: price CTA on every page */
nav .gutter { flex-wrap: wrap }
.nav-links { margin-left: auto }
.nav-cta-btn {
    font-family: var(--font-body); font-size: .92rem; font-weight: 700; white-space: nowrap;
    color: var(--ink); background: var(--mint); padding: .55rem 1.1rem; border-radius: 999px;
    transition: transform .25s var(--ease), background .25s var(--ease);
}
.nav-cta-btn:hover { color: var(--ink); transform: translateY(-1px) }
.nav-cta-btn[aria-current="page"] { background: transparent; color: var(--mint); box-shadow: inset 0 0 0 1.5px var(--mint) }
@media (max-width: 1000px) {
    nav .gutter { row-gap: .6rem }
    .nav-links { order: 3; width: 100%; margin-left: -.5rem }
    .nav-cta-btn { margin-left: auto; font-size: .86rem; padding: .5rem 1rem }
}

/* Price cards line up; totals stay on one line */
@media (min-width: 801px) { .price-card h3 { min-height: 2.5em } }
.pc-total { flex-wrap: nowrap; align-items: center }
.pc-total .k { flex: 0 1 auto; min-width: 0 }
.pc-total .v { font-size: clamp(1.3rem, 5vw, 1.6rem) }
/* Hero photo crop on narrow screens */
@media (max-width: 900px) { .hero-photo img { object-position: center 22% } }
/* One radius scale: 10 / 14 / 20 */
.price-card, .price-note, .steps-photo { border-radius: 20px }
.hero-note { border-radius: 14px }

/* Footer legal links */
footer .legal { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem }
footer .legal a { color: rgba(255, 255, 255, .8); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px }
footer .legal a:hover { color: var(--mint); text-decoration-color: var(--mint) }
/* Phone nav: short labels so all items fit */
.nav-links .s { display: none }
@media (max-width: 640px) {
    .nav-links { overflow: visible; -webkit-mask-image: none; mask-image: none; padding-right: 0; justify-content: space-between; margin-inline: -.6rem }
    .nav-links .l { display: none }
    .nav-links .s { display: inline }
    .nav-links a { padding: .45rem .6rem; font-size: .86rem }
}

/* ═══ Alapalkki (yhteinen kaikille mallinnuksille; linkit kuten nykyisen sivuston alapalkissa) ═══ */
.nx-deco { height: 14px; background: repeating-linear-gradient(45deg, oklch(0.80 0.17 162) 0 3px, transparent 3px 21px); background-color: #0a0a0a }
.nx-foot { background: #0a0a0a; color: #fff; border-top: 1px solid rgba(255,255,255,.16); font-family: 'Public Sans', system-ui, sans-serif }
.nx-foot .nx-fin { width: 100%; max-width: 1400px; margin: 0 auto; padding-left: max(1.25rem, env(safe-area-inset-left, 0px)); padding-right: max(1.25rem, env(safe-area-inset-right, 0px)) }
@media (min-width: 700px) { .nx-foot .nx-fin { padding-left: max(2.5rem, env(safe-area-inset-left, 0px)); padding-right: max(2.5rem, env(safe-area-inset-right, 0px)) } }
@media (min-width: 1200px) { .nx-foot .nx-fin { padding-left: max(5rem, env(safe-area-inset-left, 0px)); padding-right: max(5rem, env(safe-area-inset-right, 0px)) } }
.nx-cols { display: grid; grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr); gap: 2.2rem; padding-block: 3.2rem 2.2rem }
.nx-brand { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.4rem }
.nx-brand span { color: oklch(0.80 0.17 162) }
.nx-tag { color: rgba(255,255,255,.6); font-size: .92rem; margin-top: .7rem; max-width: 30ch; line-height: 1.5 }
.nx-col h2 { font-family: 'Public Sans', system-ui, sans-serif; font-size: .9rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: oklch(0.80 0.17 162); margin: 0 0 .9rem }
.nx-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; margin: 0; padding: 0 }
.nx-col a { color: rgba(255,255,255,.72); font-size: .92rem; text-decoration: none; overflow-wrap: anywhere }
.nx-col a:hover { color: oklch(0.80 0.17 162) }
.nx-bottom { border-top: 1px solid rgba(255,255,255,.16); padding-block: 1.3rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.6rem; font-size: .85rem; color: rgba(255,255,255,.6) }
.nx-bottom p { margin: 0 }
.nx-bottom div { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem }
.nx-bottom a { color: rgba(255,255,255,.8); text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px }
.nx-bottom a:hover, .nx-bottom a[aria-current="page"] { color: oklch(0.80 0.17 162); text-decoration-color: oklch(0.80 0.17 162) }
@media (max-width: 1000px) { .nx-cols { grid-template-columns: repeat(2, minmax(0, 1fr)) } .nx-cols > div:first-child { grid-column: 1 / -1 } }
@media (max-width: 520px) { .nx-cols { gap: 1.8rem 1.2rem } }

/* ── Juridiset sivut ── */
.lg-hero { background: var(--dark-grad); display: block; min-height: 0 }
.lg-hero .gutter.lg-hero-in { max-width: 1400px; margin: 0 auto }
.lg-hero .gutter { padding-block: clamp(2.6rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); display: flex; flex-direction: column; gap: 1.3rem }
.crumbs { display: flex; gap: .5rem; font-size: .9rem; color: var(--text-dim) }
.crumbs a { color: rgba(255, 255, 255, .78) } .crumbs a:hover { color: var(--mint) }
.crumbs .sep { color: rgba(255, 255, 255, .3) }
.lg-hero h1 { font-size: clamp(1.75rem, 4.4vw, 3.6rem); max-width: 22ch; overflow-wrap: break-word; hyphens: auto }
.lg-hero h1, .lg-hero { min-width: 0 }
.lg-hero .hero-lead { max-width: 52ch }
.lg-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: .6rem; width: 100%; max-width: 820px }
@media (min-width: 900px) { .lg-facts { grid-template-columns: 1.4fr 1fr 1fr } }
.lg-facts > div { background: rgba(255, 255, 255, .07); border-radius: 14px; padding: .9rem 1.1rem; min-width: 0 }
.lg-facts .k { font-weight: 700; font-size: .82rem; color: var(--mint) }
.lg-facts .v { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--paper); margin-top: .2rem; overflow-wrap: anywhere }
@media (max-width: 560px) { .lg-facts { grid-template-columns: 1fr 1fr } .lg-facts > div:first-child { grid-column: 1 / -1 } }

.lg-body { background: var(--paper); color: var(--ink) }
.legal-wrap { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3.5rem, 7vw, 5.5rem) }
.legal-wrap > main { min-width: 0 }
.toc { position: sticky; top: 6rem; align-self: start; max-height: calc(100vh - 7.5rem); overflow: auto; background: var(--paper-dim); border-radius: 20px; padding: 1.2rem 1rem }
.toc summary { list-style: none; cursor: default; font-weight: 700; font-size: .95rem; color: var(--mint-deep); padding: 0 .4rem .6rem; display: flex; justify-content: space-between; align-items: center }
.toc summary::-webkit-details-marker { display: none }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: .1rem }
.toc a { display: block; padding: .45rem .6rem; border-radius: 10px; font-size: .88rem; line-height: 1.35; color: rgba(10, 10, 10, .7); transition: background .2s var(--ease), color .2s var(--ease) }
.toc a:hover { background: rgba(10, 10, 10, .05); color: var(--ink) }
.toc a.on { background: var(--ink); color: var(--mint); font-weight: 600 }
@media (max-width: 900px) {
    .legal-wrap { grid-template-columns: 1fr; gap: 1.6rem }
    .toc { position: static; max-height: none; padding: 0 }
    .toc summary { cursor: pointer; padding: 1rem 1.2rem; margin: 0 }
    .toc summary::after { content: '+'; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--mint) 18%, transparent); color: var(--mint-deep); font-size: 1.2rem; transition: transform .3s var(--ease) }
    .toc[open] summary::after { transform: rotate(45deg) }
    .toc ol { padding: 0 .6rem .8rem }
}
@media (min-width: 901px) { .toc summary { pointer-events: none } }

.doc { max-width: 72ch; min-width: 0 }
.doc > .doc-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.doc .doc-subtitle { display: inline-flex; font-weight: 700; font-size: .85rem; color: var(--mint-deep); background: color-mix(in oklab, var(--mint) 16%, transparent); padding: .3rem .8rem; border-radius: 999px }
.doc .doc-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin: .8rem 0 2.4rem }
.doc .doc-meta p, .doc .doc-meta p + p { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--text-dim-ink) }
.doc .doc-meta strong { font-weight: 600; color: rgba(10, 10, 10, .75) }
.doc h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.35rem, 2.2vw, 1.6rem); letter-spacing: -.01em; line-height: 1.2; margin: 3rem 0 1rem; padding-top: 1.4rem; border-top: 1px solid var(--line); scroll-margin-top: 6rem }
.doc .doc-meta + h2, .doc h2:first-child { margin-top: 0; border-top: 0; padding-top: 0 }
.doc h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; margin: 2rem 0 .6rem }
.doc p, .doc li { color: #2a2a2a; font-size: 1rem; line-height: 1.72 }
.doc p + p { margin-top: .9rem }
.doc ul, .doc ol { margin: .8rem 0 1rem 1.3rem; display: flex; flex-direction: column; gap: .35rem }
.doc strong { font-weight: 600; color: var(--ink) }
.doc em { font-style: italic; color: var(--text-dim-ink) }
.doc a { color: var(--mint-deep); text-decoration: underline; text-underline-offset: 2px }
.doc blockquote { border-left: 3px solid var(--mint); padding-left: 1.2rem; margin: 1rem 0 }
.doc .table-wrap { overflow-x: auto; margin: 1.2rem 0; border-radius: 14px; border: 1px solid var(--line) }
.doc table { border-collapse: collapse; width: 100%; font-size: .92rem }
.doc th, .doc td { text-align: left; vertical-align: top; padding: .75rem 1rem; border-bottom: 1px solid var(--line) }
.doc tr:last-child td { border-bottom: 0 }
.doc th { font-weight: 700; font-size: .85rem; color: var(--mint-deep); background: var(--paper-dim) }
.doc .doc-footer { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--text-dim-ink) }
.to-top { position: fixed; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: max(1rem, env(safe-area-inset-bottom, 0px)); z-index: 40; width: 2.9rem; height: 2.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--mint); font-size: 1.2rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease) }
.to-top.show { opacity: 1; pointer-events: auto }
footer .legal a[aria-current="page"] { color: var(--mint); text-decoration-color: var(--mint) }

/* ═══ Alapalkki (yhteinen kaikille mallinnuksille; linkit kuten nykyisen sivuston alapalkissa) ═══ */
.nx-deco { height: 14px; background: repeating-linear-gradient(45deg, oklch(0.80 0.17 162) 0 3px, transparent 3px 21px); background-color: #0a0a0a }
.nx-foot { background: #0a0a0a; color: #fff; border-top: 1px solid rgba(255,255,255,.16); font-family: 'Public Sans', system-ui, sans-serif }
.nx-foot .nx-fin { width: 100%; max-width: 1400px; margin: 0 auto; padding-left: max(1.25rem, env(safe-area-inset-left, 0px)); padding-right: max(1.25rem, env(safe-area-inset-right, 0px)) }
@media (min-width: 700px) { .nx-foot .nx-fin { padding-left: max(2.5rem, env(safe-area-inset-left, 0px)); padding-right: max(2.5rem, env(safe-area-inset-right, 0px)) } }
@media (min-width: 1200px) { .nx-foot .nx-fin { padding-left: max(5rem, env(safe-area-inset-left, 0px)); padding-right: max(5rem, env(safe-area-inset-right, 0px)) } }
.nx-cols { display: grid; grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr); gap: 2.2rem; padding-block: 3.2rem 2.2rem }
.nx-brand { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.4rem }
.nx-brand span { color: oklch(0.80 0.17 162) }
.nx-tag { color: rgba(255,255,255,.6); font-size: .92rem; margin-top: .7rem; max-width: 30ch; line-height: 1.5 }
.nx-col h2 { font-family: 'Public Sans', system-ui, sans-serif; font-size: .9rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: oklch(0.80 0.17 162); margin: 0 0 .9rem }
.nx-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; margin: 0; padding: 0 }
.nx-col a { color: rgba(255,255,255,.72); font-size: .92rem; text-decoration: none; overflow-wrap: anywhere }
.nx-col a:hover { color: oklch(0.80 0.17 162) }
.nx-bottom { border-top: 1px solid rgba(255,255,255,.16); padding-block: 1.3rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.6rem; font-size: .85rem; color: rgba(255,255,255,.6) }
.nx-bottom p { margin: 0 }
.nx-bottom div { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem }
.nx-bottom a { color: rgba(255,255,255,.8); text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px }
.nx-bottom a:hover, .nx-bottom a[aria-current="page"] { color: oklch(0.80 0.17 162); text-decoration-color: oklch(0.80 0.17 162) }
@media (max-width: 1000px) { .nx-cols { grid-template-columns: repeat(2, minmax(0, 1fr)) } .nx-cols > div:first-child { grid-column: 1 / -1 } }
@media (max-width: 520px) { .nx-cols { gap: 1.8rem 1.2rem } }
.skip-link{position:absolute;left:-9999px;top:0;z-index:100;background:#fff;color:#0a0a0a;padding:.6rem 1rem;border-radius:0 0 10px 0}
.skip-link:focus{left:0}
