/* IPR-Loikka – sivuston tyylit (uusi ilme).
   Kaikki värit, typografia ja välit ovat muuttujina (vaatimusmäärittely 5.1, 7.2). */

:root {
  /* Brändi */
  --brand-graphite: #1f2937;
  --brand-graphite-deep: #111827;
  /* Korosteväri: oletus oranssi. Väliaikainen esikatselu vaihtaa nämä [data-accent]-arvolla. */
  --brand-accent: #f59e0b;          /* painikkeet, merkit */
  --brand-accent-hover: #fbbf24;
  --on-accent: #111827;             /* teksti korostevärin päällä */
  --accent-on-graphite: #fbbf24;    /* korosteteksti grafiitilla (yläpalkki, korostelaatikot) */
  --accent-soft: rgba(245, 158, 11, .14);
  --link-light: #9a5b00;            /* linkit vaaleassa teemassa, kontrasti valkoisella ≥ 4.5:1 */
  --link-dark: #fbbf24;             /* linkit tummassa teemassa */

  /* Typografia: järjestelmäfontit, ei ulkoisia latauksia */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-body: 1.0625rem;             /* 17 px */
  --fs-small: 0.9375rem;
  --fs-h1: clamp(2rem, 1.2rem + 3.2vw, 3.25rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --fs-h3: 1.25rem;
  --lh-body: 1.6;
  --lh-tight: 1.15;

  /* Mitoitus */
  --content-max: 1160px;
  --text-max: 68ch;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --section-pad: clamp(3.5rem, 2rem + 5vw, 6rem);
  --radius: 14px;
  --radius-small: 8px;
  --header-h: 72px;
  --tap: 44px;
}

/* Vaalea teema */
:root,
[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-alt: #eceff3;
  --surface: #ffffff;
  --text: #111827;
  --text-muted: #4b5563;
  --border: #d9dde3;
  --link: var(--link-light);
  --focus: #1d4ed8;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.06), 0 8px 24px rgba(17, 24, 39, 0.06);
  color-scheme: light;
}

/* Tumma teema (oletus, kuten nykyisellä sivulla) */
[data-theme="dark"] {
  --bg: #0f141c;
  --bg-alt: #151c26;
  --surface: #1b2330;
  --text: #f3f4f6;
  --text-muted: #b6bdc8;
  --border: #2d3746;
  --link: var(--link-dark);
  --focus: #93c5fd;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* Perusasetukset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  transition: background-color .2s, color .2s;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: var(--lh-tight); margin: 0 0 var(--space-2); letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); font-weight: 800; overflow-wrap: break-word; hyphens: manual; }
h2 { font-size: var(--fs-h2); font-weight: 750; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
p { margin: 0 0 var(--space-2); }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
ul { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2.5rem, var(--content-max)); margin-inline: auto; }
.prose { max-width: var(--text-max); }
.muted { color: var(--text-muted); }
.eyebrow {
  display: inline-block; margin-bottom: var(--space-1);
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--link);
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  padding: .75rem 1rem; background: var(--brand-accent); color: var(--on-accent);
  font-weight: 700; border-radius: var(--radius-small); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Painikkeet */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--tap); padding: .7rem 1.25rem;
  border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--brand-accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--brand-accent-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text); }
.btn-on-dark { color: #fff; border-color: rgba(255,255,255,.35); }
.btn-on-dark:hover { border-color: #fff; }
.btn:active { transform: translateY(1px); }

/* Yläpalkki: aina grafiitti, kuten varaus.iprloikka.fi */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand-graphite); color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; gap: var(--space-2); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: .01em; }
.brand-mark { width: 38px; height: 38px; color: var(--accent-on-graphite); }
.brand:hover { text-decoration: none; }

.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: .25rem; list-style: none; }
.nav-list a {
  display: inline-flex; align-items: center; gap: .35rem; min-height: var(--tap); padding: 0 .75rem;
  color: #e5e7eb; text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: var(--radius-small);
}
.nav-list a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-list svg { width: 1em; height: 1em; }

.header-tools { display: flex; align-items: center; gap: .25rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap); padding: 0 .6rem;
  background: transparent; color: #e5e7eb; border: 0; border-radius: var(--radius-small);
  font: inherit; font-weight: 700; font-size: .9rem; text-decoration: none; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.header-cta { margin-left: .25rem; }
.menu-toggle { display: none; }

/* Hero */
.hero { padding: clamp(2.5rem, 1rem + 6vw, 5.5rem) 0 var(--section-pad); background:
  radial-gradient(1200px 400px at 85% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: var(--space-3); }
.hero-lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); color: var(--text-muted); max-width: 44ch; margin-bottom: var(--space-4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: var(--space-3); }
.hero-phone { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-muted); }
.hero-phone a { color: var(--text); font-weight: 700; text-decoration: none; }
.hero-phone a:hover { text-decoration: underline; }
.hero-phone svg { width: 1.1rem; height: 1.1rem; color: var(--link); }

.profile-card {
  justify-self: center; width: min(100%, 360px);
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow); padding: var(--space-3); text-align: center;
}
.profile-card img { width: 220px; height: 220px; margin: 0 auto var(--space-2); border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 8px var(--brand-accent); }
.profile-name { font-size: 1.25rem; font-weight: 800; margin: 0; }
.profile-role { color: var(--text-muted); font-size: var(--fs-small); margin: .25rem 0 var(--space-2); }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; list-style: none; }
.badges li { font-size: .8125rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; background: var(--bg-alt); color: var(--text); }

/* Osiot */
.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: var(--text-max); margin-bottom: var(--space-4); }
.section-head p { color: var(--text-muted); }

/* Palvelukortit */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); list-style: none; }
@media (max-width: 1180px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
.card {
  display: flex; flex-direction: column; height: 100%;
  padding: var(--space-4) var(--space-3); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-icon { width: 48px; height: 48px; padding: 11px; margin-bottom: var(--space-2); border-radius: 12px;
  background: var(--accent-soft); color: var(--link); }
.card p { color: var(--text-muted); }
.card .card-link { margin-top: auto; font-weight: 700; display: inline-flex; align-items: center; gap: .35rem; min-height: var(--tap); }
.card .card-link svg { width: 1em; height: 1em; transition: transform .15s; }
.card .card-link:hover svg { transform: translateX(3px); }
.after-cards { margin-top: var(--space-4); color: var(--text-muted); max-width: var(--text-max); }

/* Kokemus */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
.stat { padding: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--link); }
.stat span { color: var(--text-muted); font-size: var(--fs-small); }
.check-list { list-style: none; display: grid; gap: .85rem; }
.check-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .5rem; align-items: start; }
.check-list svg { width: 1.3rem; height: 1.3rem; margin-top: .2rem; color: var(--link); }

/* Tavaramerkkiosio */
.feature {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-4); align-items: center;
  padding: clamp(2rem, 4vw, 3.5rem); border-radius: calc(var(--radius) + 6px);
  background: var(--brand-graphite); color: #f3f4f6;
}
.feature h2 { color: #fff; }
.feature .eyebrow { color: var(--accent-on-graphite); }
.feature p { color: #d1d5db; }
.feature-highlight { color: var(--accent-on-graphite); }
.feature-steps { list-style: none; counter-reset: step; display: grid; gap: var(--space-2); }
.feature-steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; gap: .75rem; align-items: start; color: #e5e7eb; }
.feature-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 2.25rem; height: 2.25rem;
  border-radius: 50%; background: var(--brand-accent); color: var(--on-accent); font-weight: 800;
}
.feature .hero-actions { margin: var(--space-3) 0 0; }

/* SME Fund */
.notice {
  padding: var(--space-4); background: var(--surface); border: 1px solid var(--border);
  border-left: 5px solid var(--brand-accent); border-radius: var(--radius); box-shadow: var(--shadow);
}
.notice-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: var(--space-2); }
.notice-head h2 { margin: 0; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); }
.updated { font-size: var(--fs-small); color: var(--text-muted); }
.status-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); margin: var(--space-3) 0; }
.status { padding: var(--space-2); border-radius: var(--radius-small); background: var(--bg-alt); }
.status strong { display: block; }
.status .tag { display: inline-block; margin-top: .35rem; font-size: .8125rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; }
.tag-closed { background: rgba(220,38,38,.14); color: #b91c1c; }
.tag-open { background: rgba(22,163,74,.15); color: #15803d; }
[data-theme="dark"] .tag-closed { color: #fca5a5; }
[data-theme="dark"] .tag-open { color: #86efac; }
details.more { margin-top: var(--space-2); border-top: 1px solid var(--border); padding-top: var(--space-2); }
details.more summary { cursor: pointer; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; gap: .5rem; color: var(--link); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid currentColor; font-size: 1rem; line-height: 1; }
details.more[open] summary::before { content: "–"; }
details.more[open] summary { margin-bottom: var(--space-1); }
.link-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: var(--space-3); }

/* Yhteystiedot */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-4); align-items: start; }
.contact-card { padding: var(--space-4); background: var(--brand-graphite); color: #f3f4f6; border-radius: calc(var(--radius) + 6px); }
.contact-card h3 { color: #fff; }
.contact-card p { color: #d1d5db; }
.contact-card .hero-actions { margin: var(--space-3) 0 0; }
.contact-list { list-style: none; display: grid; gap: .25rem; }
.contact-list li { display: grid; grid-template-columns: 2.5rem 1fr; align-items: center; min-height: var(--tap); }
.contact-list svg { width: 1.25rem; height: 1.25rem; color: var(--link); }
.contact-list a { font-weight: 600; }

/* Alatunniste */
.site-footer { background: var(--brand-graphite-deep); color: #c9ced6; padding: var(--space-5) 0 var(--space-4); font-size: var(--fs-small); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); align-items: center; }
.site-footer a { color: #f3f4f6; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; }
.footer-links a { display: inline-flex; min-height: var(--tap); align-items: center; }
.site-footer .brand { font-size: 1.05rem; }
.site-footer .brand-mark { width: 30px; height: 30px; }

/* Ehdotusbanneri (vain esikatselussa) */
.proposal-banner { background: #fef3c7; color: #78350f; font-size: .875rem; text-align: center; padding: .5rem 1rem; }
.proposal-banner a { color: inherit; font-weight: 700; }

/* Responsiivisuus */
@media (max-width: 960px) {
  .hero-grid, .split, .feature, .contact-grid { grid-template-columns: 1fr; }
  .profile-card { order: -1; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .header-cta { display: none; }
}

@media (max-width: 860px) {
  .js .menu-toggle { display: inline-flex; }
  .js .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--brand-graphite); border-top: 1px solid rgba(255,255,255,.08);
    padding: .5rem 1rem 1rem; display: none;
  }
  .js .main-nav.is-open { display: block; }
  .js .nav-list { flex-direction: column; align-items: stretch; }
  .js .nav-list a { padding: 0 .5rem; }
  .main-nav { margin-left: 0; order: 3; width: 100%; }
  .header-inner { flex-wrap: wrap; }
  .js .header-inner { flex-wrap: nowrap; }
  .header-tools { margin-left: auto; }
  .nav-list { flex-wrap: wrap; }
}

@media (max-width: 520px) {
  .status-list, .stats { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .brand-text { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .proposal-banner, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}

/* Hyvin kapeat näytöt (320–380 px) */
@media (max-width: 380px) {
  .container { width: calc(100% - 1.5rem); }
  .header-inner { gap: .5rem; }
  .brand { white-space: nowrap; gap: .4rem; }
  .brand-mark { width: 32px; height: 32px; }
  .header-tools { gap: 0; }
  .notice, .contact-card, .feature { padding: var(--space-3); }
}

/* ===== Vaihtoehtoiset korostevärit (logon klikkaus vaihtaa, ks. js/new-script.js) ===== */
[data-accent="petrooli"] { --brand-accent: #14b8a6; --brand-accent-hover: #2dd4bf; --on-accent: #111827; --accent-on-graphite: #2dd4bf; --accent-soft: rgba(20,184,166,.15); --link-light: #0f766e; --link-dark: #5eead4; }
[data-accent="sininen"] { --brand-accent: #2563eb; --brand-accent-hover: #1d4ed8; --on-accent: #ffffff; --accent-on-graphite: #93c5fd; --accent-soft: rgba(37,99,235,.15); --link-light: #1d4ed8; --link-dark: #93c5fd; }
[data-accent="syaani"] { --brand-accent: #38bdf8; --brand-accent-hover: #7dd3fc; --on-accent: #111827; --accent-on-graphite: #7dd3fc; --accent-soft: rgba(56,189,248,.15); --link-light: #0369a1; --link-dark: #7dd3fc; }
[data-accent="smaragdi"] { --brand-accent: #10b981; --brand-accent-hover: #34d399; --on-accent: #111827; --accent-on-graphite: #34d399; --accent-soft: rgba(16,185,129,.15); --link-light: #047857; --link-dark: #6ee7b7; }
[data-accent="messinki"] { --brand-accent: #d4b45a; --brand-accent-hover: #e5c97a; --on-accent: #111827; --accent-on-graphite: #e5c97a; --accent-soft: rgba(212,180,90,.18); --link-light: #7a5f12; --link-dark: #e5c97a; }

.accent-cycle { cursor: pointer; }
.accent-cycle .brand-mark { transition: transform .25s ease; }
.accent-cycle:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.accent-cycle.is-jumping .brand-mark { animation: brand-jump .45s ease; }
@keyframes brand-jump { 0% { transform: translateY(0); } 40% { transform: translateY(-6px) rotate(-10deg); } 100% { transform: translateY(0); } }
.accent-toast {
  position: fixed; left: 50%; top: calc(var(--header-h) + 12px); z-index: 60; margin: 0;
  transform: translate(-50%, -8px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .9rem; border-radius: 999px; background: var(--brand-graphite-deep); color: #fff;
  font-size: .9rem; font-weight: 600; box-shadow: var(--shadow); transition: opacity .2s, transform .2s;
}
.accent-toast::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-accent); }
.accent-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.accent-toast:empty { display: none; }
.brand, .nav-list a, .site-header .btn { white-space: nowrap; }

/* ===== Yhteiset lisäykset koko sivustolle ===== */
.nav-list a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--accent-on-graphite); border-radius: 0; }
.footer-meta { margin: .5rem 0 0; }
.section-tight-top { padding-top: 0; }

/* Alasivujen otsikkoalue */
.page-hero {
  padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0 clamp(2rem, 1rem + 3vw, 3rem);
  background: radial-gradient(1000px 320px at 85% -20%, var(--accent-soft), transparent 60%), var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { margin-bottom: var(--space-2); }
.page-lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--text-muted); max-width: var(--text-max); margin: 0; }

/* Palvelusivu: avattavat palvelukuvaukset (natiivi details = toimii näppäimistöllä ja ruudunlukijalla) */
.service-tools { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); }
.service-list { display: grid; gap: var(--space-2); }
.service {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.service > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-2);
  min-height: var(--tap); padding: var(--space-3);
}
.service > summary::-webkit-details-marker { display: none; }
.service > summary h2 { margin: 0; font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); flex: 1; }
.service > summary .card-icon { margin: 0; flex: none; }
.service > summary .chev { width: 1.5rem; height: 1.5rem; flex: none; color: var(--link); transition: transform .2s; }
.service[open] > summary .chev { transform: rotate(180deg); }
.service > summary:hover h2 { color: var(--link); }
.service-body { padding: 0 var(--space-3) var(--space-3); border-top: 1px solid var(--border); padding-top: var(--space-3); }
.service-body > *:last-child { margin-bottom: 0; }
.service-body h3 { font-size: 1.05rem; margin: var(--space-3) 0 var(--space-1); }
.service-body h3:first-child { margin-top: 0; }
.service-body ul, .service-body ol, .prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 var(--space-2); }
.service-body li, .prose li { margin-bottom: .35rem; }
.service-body .lead-in { font-weight: 700; margin-bottom: var(--space-1); }
.service-body ol.numbered > li { margin-bottom: var(--space-2); }
.service-body ol.numbered > li strong { display: block; }

/* Lomakesivu */
.form-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-4); align-items: start; }
.form-card { padding: var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { display: grid; gap: .35rem; margin-bottom: var(--space-3); }
.field label { font-weight: 700; }
.field .hint { font-size: var(--fs-small); color: var(--text-muted); }
.field input, .field textarea {
  width: 100%; min-height: var(--tap); padding: .7rem .85rem;
  font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--border); border-radius: var(--radius-small);
}
.field textarea { min-height: 11rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--focus); outline-offset: 1px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { font-size: var(--fs-small); color: var(--text-muted); padding: var(--space-2); border-radius: var(--radius-small); background: var(--bg-alt); margin-bottom: var(--space-3); }
.alert { padding: var(--space-2) var(--space-3); border-radius: var(--radius-small); margin-bottom: var(--space-3); font-weight: 600; border-left: 5px solid; }
.alert-ok { background: rgba(22,163,74,.12); border-color: #16a34a; color: #166534; }
.alert-error { background: rgba(220,38,38,.10); border-color: #dc2626; color: #991b1b; }
[data-theme="dark"] .alert-ok { color: #bbf7d0; }
[data-theme="dark"] .alert-error { color: #fecaca; }
.req { color: var(--link); }

/* Oikeudelliset sivut */
.legal { padding: var(--section-pad) 0; }
.legal .prose h2 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); margin: var(--space-4) 0 var(--space-2); }
.legal .prose h2:first-of-type { margin-top: var(--space-3); }
.legal .prose h3 { font-size: 1.05rem; margin: var(--space-3) 0 var(--space-1); }
.updated-line { color: var(--text-muted); font-size: var(--fs-small); }
.address-block { list-style: none; padding: 0 !important; }
.address-block li { margin: 0; }

@media (max-width: 960px) {
  .form-layout { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .service > summary { padding: var(--space-2); }
  .service-body { padding: var(--space-2); }
  .service > summary .card-icon { display: none; }
  .form-card { padding: var(--space-3); }
}
/* Oikeudelliset sivut: teksti samaan linjaan otsikon kanssa, rivin pituus rajattu */
.legal .container.prose { max-width: none; }
.legal .prose > * { max-width: var(--text-max); }
.legal { padding-top: var(--space-4); }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }
/* Ruudukon sarakkeet eivät saa leventyä sisällön mukaan yli näytön */
.contact-grid > *, .card-grid > *, .hero-grid > *, .split > *, .feature > *, .form-layout > * { min-width: 0; }
.contact-list a { overflow-wrap: anywhere; }
