/* Käsin kirjoitettujen sivujen yhteiset tyylit — Pohjoismainen tietojulkaisu,
   yhdenmukainen _theme.html.j2:n kirjasin-, väri- ja tyyppitokenien kanssa. */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/vendor/fonts/newsreader-latin-ext-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/vendor/fonts/newsreader-latin-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/vendor/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/vendor/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #fafaf7;
  --panel: #ffffff;
  --panel2: #e2e2dc;
  --border: #e2e2dc;
  --border-strong: #8a9099;
  --control-border: #6b7280;
  --surface-alt: #f1f1ec;
  --text: #141619;
  --muted: #4a5058;
  --accent: #1b3b82;
  --accent-hover: #142d66;
  --accent-soft: #e8edf7;
  --on-accent: #ffffff;
  --rose: #a61b1b;
  --rose-soft: #fae8ee;
  --ok: #14633a;
  --ok-soft: #e6f4ec;
  --font-display: 'Newsreader', Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --type-title: 1.5rem;
  --type-headline: 1.125rem;
  --type-body: 1rem;
  --type-callout: 0.9375rem;
  --type-subhead: 0.875rem;
  --type-footnote: 0.8125rem;
  --type-caption: 0.75rem;
  --type-caption2: 0.6875rem;
  --radius-sm: 5px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;
  accent-color: var(--accent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111317;
    --panel: #171a20;
    --panel2: #282d37;
    --border: #282d37;
    --border-strong: #525b6b;
    --control-border: #76808f;
    --surface-alt: #1f232b;
    --text: #eceeef;
    --muted: #a2aab4;
    --accent: #88acf5;
    --accent-hover: #a6c2f8;
    --accent-soft: rgba(136, 172, 245, 0.14);
    --on-accent: #111317;
    --rose: #f2746b;
    --rose-soft: rgba(242, 116, 107, 0.14);
    --ok: #55c58a;
    --ok-soft: rgba(85, 197, 138, 0.14);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111317;
  --panel: #171a20;
  --panel2: #282d37;
  --border: #282d37;
  --border-strong: #525b6b;
  --control-border: #76808f;
  --surface-alt: #1f232b;
  --text: #eceeef;
  --muted: #a2aab4;
  --accent: #88acf5;
  --accent-hover: #a6c2f8;
  --accent-soft: rgba(136, 172, 245, 0.14);
  --on-accent: #111317;
  --rose: #f2746b;
  --rose-soft: rgba(242, 116, 107, 0.14);
  --ok: #55c58a;
  --ok-soft: rgba(85, 197, 138, 0.14);
}
* { box-sizing: border-box; }
::selection { background: var(--accent-soft); color: var(--text); }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0; padding: 0 20px 64px;
  font-family: var(--font-sans);
  background: var(--bg); color: var(--text); line-height: 1.6;
}
.ohita-linkki {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 8px 14px; border-radius: var(--radius-sm); font-size: var(--type-footnote); font-weight: 600;
  text-decoration: none;
}
.ohita-linkki:focus { left: 16px; }
.kuori { max-width: 760px; margin: 0 auto; }
header.ylatunniste {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; padding: 20px 0 14px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 28px;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: var(--type-headline); color: var(--text);
  letter-spacing: -0.02em; margin: 0; text-decoration: none;
}
.logo .brand-accent { color: var(--accent); }
.logo .brand-merkki { width: 22px; height: 22px; flex-shrink: 0; display: block; border-radius: var(--radius-sm); }
.ylanavi {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.ylanavi a { color: var(--muted); font-size: var(--type-subhead); font-weight: 500; margin-left: 0;
             display: inline-flex; align-items: center; min-height: 44px; padding: 6px 4px; text-decoration: none; }
@media (hover: hover) {
  .ylanavi a:hover { color: var(--text); }
  .ylanavi a.nappi:hover { color: var(--on-accent); background: var(--accent-hover); text-decoration: none; }
}
.ylanavi a.nappi { color: var(--on-accent); text-decoration: none; padding: 10px 18px; }
.ylanavi a.nappi-tiivis { min-height: 44px; padding: 8px 14px; font-size: var(--type-subhead); }
.toimintorivi {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 0 0 28px;
}
.kortti .toimintorivi {
  margin: 12px 0 0;
}
.tilaus-kortti {
  background: var(--surface-alt);
  margin-top: 16px;
}
.tilaus-kortti h3 {
  margin-top: 0;
}
.nappi-tiivis {
  padding: 6px 14px;
  font-size: var(--type-subhead);
  border-radius: var(--radius-sm);
}
h1 {
  font-family: var(--font-display); font-optical-sizing: auto; font-weight: 500;
  font-size: 2rem; line-height: 1.15; margin: 20px 0 12px; letter-spacing: -0.02em;
  text-wrap: balance;
}
h2 {
  font-family: var(--font-display); font-optical-sizing: auto; font-weight: 500;
  font-size: 1.3125rem; line-height: 1.25; margin: 32px 0 10px;
  border-top: 1px solid var(--border); padding-top: 18px;
  text-wrap: balance;
}
h3 { font-size: var(--type-callout); font-weight: 600; margin: 18px 0 4px; text-wrap: balance; }
p, li { text-wrap: pretty; }
p { margin: 0 0 14px; }
.lead { font-size: var(--type-callout); color: var(--muted); margin: 0 0 24px; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 2px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin: 0 0 6px; }
.kortti {
  background: var(--panel);
  border: 0;
  border-top: 2px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 20px 22px;
  margin: 0 0 18px;
}
.kortti > h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.osiot { display: grid; gap: 16px 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 0 0 20px; }
.osio {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border-strong);
  border-radius: 0;
  padding: 12px 0 6px;
}
.osio h3 { margin: 0 0 4px; font-size: var(--type-callout); font-weight: 600; color: var(--text); }
.osio p { margin: 0; font-size: var(--type-footnote); color: var(--muted); line-height: 1.5; }
.hinta { font-size: 1.625rem; font-weight: 600; margin: 6px 0 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hinta .alv { font-size: var(--type-footnote); font-weight: 400; color: var(--muted); letter-spacing: 0; }
.nappi {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 10px 18px; font-size: var(--type-callout);
  font-weight: 600; border: 0; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent);
  cursor: pointer; font-family: inherit; text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
@media (hover: hover) {
  .nappi:hover { background: var(--accent-hover); }
  .nappi.toissijainen:hover { border-color: var(--accent); background: var(--surface-alt); }
}
.nappi:active { transform: scale(0.99); }
.nappi:disabled { opacity: 0.5; cursor: not-allowed; }
.nappi.toissijainen { background: transparent; color: var(--accent); border: 1px solid var(--control-border); }
input, select, textarea {
  width: 100%; padding: 10px 12px; min-height: 44px;
  font: inherit; font-size: max(1rem, 1em);
  border: 1px solid var(--control-border); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text);
  margin: 0 0 4px;
}
select:not([multiple]):not([size]) {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
:is(input, select, textarea):user-invalid {
  border-color: var(--rose);
  background-color: var(--rose-soft);
}
label { display: block; font-size: var(--type-footnote); font-weight: 600;
        color: var(--text); margin: 14px 0 6px; }
.vihje { font-size: var(--type-footnote); color: var(--muted); margin: 0 0 6px; }
.valinta { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; }
.valinta input[type="checkbox"] {
  width: 24px; height: 24px; min-height: 24px; flex: none; margin: 0; accent-color: var(--accent);
}
.valinta label { margin: 0; font-size: var(--type-subhead); font-weight: 400; color: var(--text); }
.virhe, .onnistui {
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: var(--type-subhead);
  margin: 0 0 14px; display: none;
}
.virhe { background: var(--rose-soft); border: 1px solid var(--rose); color: var(--rose); }
.onnistui { background: var(--ok-soft); border: 1px solid var(--ok); color: var(--ok); }
.virhe.visible, .onnistui.visible { display: block; }
.virhe ul { margin: 6px 0 0; }
footer.alatunniste {
  margin: 40px 0 0; padding: 18px 0 0; border-top: 1px solid var(--border);
  color: var(--muted); font-size: var(--type-footnote);
}
footer.alatunniste a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 4px; margin-right: 14px; }
.nappi:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px;
}
a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
.tulossa-badge { font-size: var(--type-caption2); }
.otsikko-virhe { color: var(--rose); }
.aktivointi-merkki {
  display: inline-block; padding: 4px 12px;
  background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok);
  border-radius: var(--radius-sm); font-weight: 600;
  font-size: var(--type-footnote); margin: 0 0 16px;
}
.tiedot-taulukko {
  margin: 20px 0; border-collapse: collapse; width: 100%;
  font-size: var(--type-subhead); font-variant-numeric: tabular-nums;
}
.tiedot-taulukko tr { border-bottom: 1px solid var(--border); }
.tiedot-taulukko tr:last-child { border-bottom: 0; }
.tiedot-taulukko th, .tiedot-taulukko td { padding: 8px 6px; vertical-align: top; }
.tiedot-taulukko th { text-align: left; color: var(--muted); font-weight: 600; width: 40%; }
.kortti-toiminnot {
  margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.kortti-toiminnot form { margin: 0; }
.teksti-ok { color: var(--ok); }
.teksti-muted { color: var(--muted); }
