/* pohjoiskarjala.com – staattisen sivuston tyylit (pohjana uuden ilmeen prototyyppi). Värit uudesta logosta, kirjasin sama kuin Facebook-korteissa. */
@font-face { font-family: "Archivo"; src: url("archivo.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --red: #D21F2B;
  --red-dark: #A8141F;
  --red-soft: #FBE8E9;
  --yellow: #FFC21A;
  --amber: #E39A00;
  --yellow-soft: #FFF4D1;
  --ink: #1E1A1B;
  --ink-2: #3A3435;
  --muted: #6B6461;
  --line: #E7E1DA;
  --cream: #F6F3EE;
  --paper: #FFFFFF;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.6 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -.02em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* Yläpalkki ja päävalikko */
.site-header { background: var(--paper); }
.topbar { display: flex; align-items: center; gap: 1.5rem; min-height: 78px; }
.logo img { height: 44px; width: auto; }
.search { margin-left: auto; display: flex; flex: 0 1 430px; }
.search input { flex: 1; min-width: 0; border: 2px solid var(--line); border-right: 0; border-radius: 999px 0 0 999px; padding: .6rem 1.1rem; font: inherit; font-size: .95rem; background: var(--cream); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--red); background: var(--paper); }
.search button { border: 0; background: var(--red); color: #fff; font: inherit; font-weight: 750; padding: 0 1.2rem; border-radius: 0 999px 999px 0; cursor: pointer; }
.search button:hover { background: var(--red-dark); }
.mainnav { position: relative; z-index: 40; background: var(--red); }
.mainnav .wrap > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; }
.mainnav .wrap > ul::-webkit-scrollbar { display: none; }
.mainnav .navlink { display: block; color: #fff; text-decoration: none; font-weight: 750; padding: .85rem 1rem .7rem; white-space: nowrap; border-bottom: 5px solid transparent; }
.mainnav .navlink:hover { background: rgba(0, 0, 0, .1); }
.mainnav .navlink[aria-current="page"] { border-bottom-color: var(--yellow); }

/* Yhteiset rakenteet */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1rem; margin: 2.75rem 0 1rem; }
.section-head h2 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.1; }
.section-head h2::before { content: ""; display: block; width: 46px; height: 6px; border-radius: 3px; background: var(--yellow); margin-bottom: .65rem; }
.section-head a { color: var(--red); font-weight: 750; text-decoration: none; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }
.chip { display: inline-flex; align-items: center; padding: .14rem .55rem; border-radius: 999px; background: var(--red-soft); color: var(--red-dark); font-weight: 750; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; }
.chip.light { background: #fff; color: var(--red); }
.chip.dark { background: var(--ink); color: #fff; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; color: var(--muted); font-size: .82rem; }
.box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.box + .box, .box + .ad, .ad + .box { margin-top: 1rem; }
.box h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--red); margin: 0 0 .6rem; overflow-wrap: anywhere; hyphens: auto; }
.button { display: inline-flex; align-items: center; gap: .4rem; background: var(--red); color: #fff; text-decoration: none; font-weight: 750; padding: .65rem 1.1rem; border-radius: 999px; border: 2px solid var(--red); }
.button:hover { background: var(--red-dark); border-color: var(--red-dark); }
.button.ghost { background: transparent; color: var(--red); }
.button.ghost:hover { background: var(--red); color: #fff; }
.ad { display: grid; place-items: center; min-height: 250px; border-radius: var(--radius); background: repeating-linear-gradient(45deg, #EFEAE3 0 10px, #F5F1EB 10px 20px); color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ad.wide { min-height: 110px; margin: 2.5rem 0 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.filter-chips a { padding: .35rem .85rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; font-weight: 650; font-size: .88rem; }
.filter-chips a:hover { border-color: var(--red); }
.filter-chips a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Etusivun pääjuttu ja tuoreimmat */
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.25rem; margin-top: 1.75rem; }
/* Logon käsivarsi tulee kortin vasemmasta reunasta kuten logossa, joten tunnus on vasemmassa yläkulmassa omassa tilassaan. */
.lead-story { --mark: clamp(130px, 16vw, 190px); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 460px; padding: calc(var(--mark) + .5rem) clamp(1.4rem, 3vw, 2.5rem) clamp(1.4rem, 3vw, 2.5rem); border-radius: var(--radius); background: var(--red); color: #fff; text-decoration: none; }
.lead-story .mark { position: absolute; top: 0; left: 0; width: var(--mark); }
.lead-story .chip, .place-hero .chip { align-self: flex-start; }
.lead-story h1, .lead-story h2 { position: relative; margin: .7rem 0 .6rem; max-width: 20ch; font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; }
.lead-story p { position: relative; margin: 0 0 1rem; max-width: 48ch; font-size: 1.08rem; opacity: .95; }
.lead-story .meta { position: relative; color: rgba(255, 255, 255, .85); }
.lead-story:hover h2 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.latest { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.latest h2 { margin: 0 0 .3rem; font-size: .95rem; text-transform: uppercase; letter-spacing: .07em; color: var(--red); }
.story-row { display: block; padding: .85rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.latest h2 + .story-row { border-top: 0; }
.story-row h3 { margin: .3rem 0 0; font-size: 1.04rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.story-row:hover h3 { color: var(--red); }

/* Päätöslista */
.decision { display: block; padding: 1rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.decision:last-child { border-bottom: 1px solid var(--line); }
.decision h3 { margin: .3rem 0 0; font-size: 1.18rem; line-height: 1.28; }
.decision:hover h3 { color: var(--red); }

/* Työpaikat */
.jobs-box { background: var(--ink); color: #fff; border: 0; }
/* Etusivun joulupukkinosto 1.11.–24.12. (Rakentaja::FRONT_SANTA): punainen laatikko lumihiutalekuviolla. */
.santa-box { border: 0; color: #fff; background-color: var(--red);
  background-image: radial-gradient(rgba(255, 255, 255, .32) 1.6px, transparent 1.8px), radial-gradient(rgba(255, 255, 255, .18) 1.1px, transparent 1.3px);
  background-size: 38px 38px, 24px 24px; background-position: 0 0, 12px 17px; }
.santa-box h2 { color: #fff; font-size: 1.15rem; letter-spacing: 0; text-transform: none; }
.santa-box p { margin: 0 0 1rem; font-size: .95rem; line-height: 1.5; }
.button.light { background: #fff; color: var(--red-dark); border-color: #fff; }
.button.light:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
/* Etusivun joukkoliikennelaatikko (artikkeli Rakentaja::FRONT_TRANSIT). */
.transit-box { border-top: 4px solid var(--yellow); }
.transit-box h2 { display: flex; align-items: center; gap: .5rem; }
.transit-icon { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--yellow-soft); color: var(--ink); flex: none; }
.transit-box p { margin: 0 0 1rem; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.jobs-box h2 { color: var(--yellow); }
.jobs-box .big { display: block; font-size: 2.8rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.jobs-box small { display: block; color: #CFC8C4; font-size: .82rem; margin: .3rem 0 .9rem; }
.jobs-box ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; }
.jobs-box li a { color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; }
.jobs-box li a:hover { color: var(--yellow); }
.jobs-box .button { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.job { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 1rem; align-items: center; padding: .9rem 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.job + .job { margin-top: .5rem; }
.job h3 { margin: 0; font-size: 1.04rem; line-height: 1.3; }
.job p { margin: 0; color: var(--muted); font-size: .88rem; }
.job:hover { border-color: var(--red); }
.deadline { font-size: .78rem; font-weight: 750; background: var(--yellow-soft); color: #7A4F00; padding: .25rem .65rem; border-radius: 999px; white-space: nowrap; }

/* Kunnat ja kohteet */
.kunnat { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: .7rem; }
.kunta { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.kunta strong { display: block; font-size: 1.1rem; }
.kunta span { color: var(--muted); font-size: .8rem; }
.kunta:hover { border-color: var(--red); box-shadow: 0 8px 22px rgba(210, 31, 43, .12); }
.places { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.place { display: block; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.place img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.place:hover img { transform: scale(1.04); }
.place div { position: relative; padding: .85rem 1rem 1rem; background: var(--paper); }
.place small { color: var(--red); font-weight: 750; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.place h3 { margin: .15rem 0 0; font-size: 1.1rem; line-height: 1.25; }
.popular { list-style: none; margin: 0; padding: 0; counter-reset: pop; }
.popular li { counter-increment: pop; display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .5rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.popular li:first-child { border-top: 0; }
.popular li::before { content: counter(pop); font-weight: 800; color: var(--red); }
.popular a { text-decoration: none; font-weight: 650; line-height: 1.3; }
.popular a:hover { color: var(--red); }

/* Artikkeli */
.breadcrumb { margin: 1.5rem 0 1rem; font-size: .85rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb span[aria-hidden] { margin: 0 .35rem; }
.article-head h1 { max-width: 24ch; margin: .65rem 0 .8rem; font-size: clamp(2rem, 4.6vw, 3.15rem); line-height: 1.05; letter-spacing: -.035em; }
.article-head .standfirst { max-width: 60ch; margin: 0 0 1rem; font-size: 1.2rem; color: var(--ink-2); }
.article-body { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 3.4vw, 2.6rem); margin-top: 1.25rem; }
.prose { max-width: 68ch; }
.prose h2 { margin: 2.1rem 0 .5rem; font-size: 1.35rem; line-height: 1.25; scroll-margin-top: 1rem; }
.prose p { margin: 0 0 1rem; }
/* Lyhyesti: valkoinen kortti, punainen otsikkorivi ja numeroidut kohdat pyöreinä merkkeinä; ensimmäinen kohta korostettuna. */
.summary-box { margin-bottom: 1.6rem; padding: 1.05rem 1.2rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 1px 0 rgba(30, 26, 27, .03); }
.summary-box > strong { display: flex; align-items: center; gap: .55rem; color: var(--red); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.summary-box > strong::before { content: ""; width: 1.4rem; height: .22rem; border-radius: 99px; background: var(--yellow); }
.summary-box ol { counter-reset: kohta; list-style: none; margin: .55rem 0 0; padding: 0; }
.summary-box li { counter-increment: kohta; display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: .7rem; align-items: start; margin: 0; padding: .55rem 0; border-top: 1px solid var(--line); }
.summary-box li:first-child { border-top: 0; }
.summary-box li::before { content: counter(kohta); display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.summary-box li:first-child::before { background: var(--red); }
.summary-box a { color: var(--ink); font-weight: 650; line-height: 1.35; text-decoration: none; }
.summary-box a:hover, .summary-box a:focus-visible { color: var(--red); text-decoration: underline; }
.source-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding: 1rem 1.2rem; border: 2px dashed var(--line); border-radius: 12px; }
.source-box p { margin: 0; font-size: .92rem; color: var(--ink-2); }

/* Kuntasivu */
.kunta-hero { position: relative; overflow: hidden; background: var(--red); color: #fff; padding-top: 2.2rem; }
.kunta-hero h1 { position: relative; margin: .3rem 0 0; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1; letter-spacing: -.04em; }
.kunta-hero p { position: relative; max-width: 52ch; margin: .6rem 0 0; opacity: .95; }
.kunta-stats { position: relative; display: flex; flex-wrap: wrap; gap: 2.2rem; margin: 1.4rem 0 1.6rem; }
.kunta-stats strong { display: block; font-size: 1.9rem; line-height: 1; color: var(--yellow); }
.kunta-stats span { font-size: .85rem; opacity: .92; }
.tabs { position: relative; display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; }
.tabs a { color: #fff; text-decoration: none; font-weight: 750; padding: .8rem 1.1rem; border-radius: 12px 12px 0 0; white-space: nowrap; }
.tabs a:hover { background: rgba(0, 0, 0, .12); }
.tabs a[aria-current="page"] { background: var(--cream); color: var(--ink); }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.service { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-weight: 650; }
.service span { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--red-soft); font-size: 1.2rem; }
.service:hover { border-color: var(--red); }

/* Kohdesivu ja galleria */
/* Vanhat kuvat ovat noin 600 px leveitä, joten kohdekuva on puolikkaan levyinen eikä venytetä koko leveydelle. */
.place-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; margin: 0 0 1.5rem; border-radius: var(--radius); background: var(--red); color: #fff; }
.place-hero .caption { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(1.4rem, 3.4vw, 2.6rem); }
.place-hero img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.place-hero h1 { margin: .7rem 0 0; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.03; letter-spacing: -.035em; }
.place-hero p { margin: .7rem 0 0; max-width: 46ch; opacity: .95; }
.kunta-hero .breadcrumb, .kunta-hero .breadcrumb a { position: relative; margin-top: 0; color: rgba(255, 255, 255, .88); }
.info-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.3rem; }
.info-card h2 { margin: 0 0 .8rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--yellow); }
.info-card dl { margin: 0; display: grid; gap: .7rem; }
.info-card dt { font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: #CFC8C4; }
.info-card dd { margin: .1rem 0 0; }
.info-card a { color: var(--yellow); }
.notice { margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px; background: var(--yellow-soft); color: #5C3D00; font-size: .88rem; }
.pk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin: 1rem 0 2rem; }
.pk-gallery a { position: relative; display: block; overflow: hidden; border-radius: 10px; background: var(--line); }
.pk-gallery img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .3s; }
.pk-gallery--feature a:first-child { grid-column: span 2; grid-row: span 2; }
.pk-gallery a:hover img { transform: scale(1.04); }
.pk-gallery a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.pk-gallery-count { color: var(--muted); font-size: .85rem; font-weight: 600; margin-left: .5rem; }
.pk-lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; }
.pk-lightbox::backdrop { background: rgba(20, 17, 18, .94); }
.pk-lightbox figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; height: 100%; margin: 0; padding: 4rem 5rem 1rem; }
.pk-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.pk-lightbox figcaption { padding: .7rem 0 .3rem; font-size: .95rem; text-align: center; }
.pk-lightbox button { position: absolute; display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font: 700 1.7rem/1 "Archivo", sans-serif; cursor: pointer; }
.pk-lightbox button:hover, .pk-lightbox button:focus-visible { background: var(--red); outline: none; }
.pk-lightbox .pk-close { top: 1rem; right: 1rem; }
.pk-lightbox .pk-prev { left: 1rem; top: calc(50% - 25px); }
.pk-lightbox .pk-next { right: 1rem; top: calc(50% - 25px); }

/* Rakennesivu */
.tree { list-style: none; margin: 0; padding: 0; }
.tree ul { list-style: none; margin: .3rem 0 .3rem 1.1rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.tree li { margin: .35rem 0; }
.tree code, .url { font-size: .8rem; background: var(--cream); padding: .1rem .4rem; border-radius: 6px; color: var(--ink-2); word-break: break-all; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.type-card h3 { margin: .4rem 0 .3rem; font-size: 1.1rem; }
.type-card p { margin: 0; font-size: .92rem; color: var(--ink-2); }
table.map { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.map th, table.map td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.map th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table-wrap { overflow-x: auto; }

/* Alatunniste */
.site-footer { margin-top: 4rem; padding: 3rem 0 2rem; background: var(--ink); color: #D9D3CF; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.site-footer img { height: 40px; width: auto; margin-bottom: .8rem; }
.site-footer p { margin: 0; font-size: .92rem; max-width: 34ch; }
.site-footer h4 { margin: 0 0 .6rem; color: #fff; font-size: .95rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-footer a { color: #D9D3CF; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid #3A3435; font-size: .85rem; }

@media (max-width: 960px) {
  .hero, .layout { grid-template-columns: minmax(0, 1fr); }
  .places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { flex-wrap: wrap; gap: .7rem; min-height: 0; padding: .8rem 0; }
  .logo img { height: 36px; }
  .search { order: 3; flex: 1 1 100%; }
  .lead-story { min-height: 0; }
  .job { grid-template-columns: 1fr; }
  .job .deadline { justify-self: start; }
  .jobs-box ul { grid-template-columns: 1fr 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .kunta-stats { gap: 1.4rem; }
  .place-hero { grid-template-columns: 1fr; }
  .place-hero img { order: -1; min-height: 0; aspect-ratio: 3 / 2; }
  .pk-lightbox figure { padding: 4rem .5rem 5rem; }
  .pk-lightbox .pk-prev, .pk-lightbox .pk-next { top: auto; bottom: 1rem; }
  .pk-lightbox .pk-prev { left: calc(50% - 60px); }
  .pk-lightbox .pk-next { right: calc(50% - 60px); }
}
@media (prefers-reduced-motion: reduce) {
  .place img, .pk-gallery img, .kunta { transition: none; }
}

/* Päätösosion kuvat: samat AI-kuvat ja päätöskortit kuin Facebook-julkaisuissa. */
.lead-story.has-image { background: var(--ink); padding-top: clamp(1.4rem, 3vw, 2.5rem); }
.lead-story .lead-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.lead-story .lead-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(30, 26, 27, .1) 0%, rgba(30, 26, 27, .3) 38%, rgba(30, 26, 27, .93) 100%); }
.lead-story.has-image > :not(.lead-bg):not(.lead-shade) { position: relative; z-index: 2; }
.lead-story .badge-mark { position: absolute !important; top: 1.1rem; right: 1.1rem; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; }
.chip.red { background: var(--red); color: #fff; }
.decision.has-thumb { grid-template-columns: 62px minmax(0, 1fr) 84px; }
.decision .thumb { width: 84px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; }
.article-head.has-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 280px); gap: 2rem; align-items: start; }
.post-card { margin: .4rem 0 0; }
.post-card img { width: 100%; border-radius: 12px; box-shadow: 0 14px 34px rgba(30, 26, 27, .18); }
.post-card figcaption { margin-top: .55rem; color: var(--muted); font-size: .78rem; line-height: 1.4; }
@media (max-width: 960px) {
  .article-head.has-card { grid-template-columns: 1fr; }
  .post-card { max-width: 340px; }
}
@media (max-width: 640px) {
  .decision.has-thumb { grid-template-columns: 50px minmax(0, 1fr) 62px; }
  .decision .thumb { width: 62px; }
}

/* Staattisen sivuston lisäykset */
.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 1rem; }
.narrow { width: min(820px, 100% - 32px); }
.muted { color: var(--muted); font-size: .9rem; }
.article-image { margin: 1rem 0 0; }
.article-image img { border-radius: var(--radius); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li { margin: .2rem 0; }
.prose h3 { margin: 1.6rem 0 .4rem; font-size: 1.12rem; }
.prose a { color: var(--red-dark); }
.prose img { border-radius: 8px; margin: .5rem 0; }
.prose iframe { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; margin: 1rem 0; background: var(--cream); }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; vertical-align: top; }
/* Sisällön osat, joita artikkeleissa voi käyttää luokilla (esim. Joensuun linja-autoaikataulut, artikkeli 76):
   ingressi, pikalinkkikortit ja hinnasto, jossa ryhmäotsikkorivit vyöhykkeille (mahtuu mobiiliin ilman sivuttaisvieritystä). */
.prose .ingressi { font-size: 1.12rem; line-height: 1.55; color: var(--ink-2); }
.prose .linkkikortit { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; margin: 1.2rem 0 1.6rem; }
.prose a.linkkikortti { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-top: 4px solid var(--red);
  border-radius: 12px; background: var(--paper); color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.prose a.linkkikortti:hover, .prose a.linkkikortti:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(30, 26, 27, .1); }
.prose a.linkkikortti strong { font-size: 1.05rem; }
.prose a.linkkikortti strong::after { content: "\00a0→"; color: var(--red); }
.prose a.linkkikortti span { color: var(--muted); font-size: .92rem; line-height: 1.4; }
.prose a.linkkikortti.ensisijainen { border-color: var(--ink); border-top-color: var(--yellow); background: var(--ink); color: #fff; }
.prose a.linkkikortti.ensisijainen strong::after { color: var(--yellow); }
.prose a.linkkikortti.ensisijainen span { color: rgba(255, 255, 255, .78); }
.prose table.hinnasto { display: table; width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; font-size: .95rem; }
.prose .hinnasto th, .prose .hinnasto td { border: 0; border-top: 1px solid var(--line); padding: .55rem .7rem; }
.prose .hinnasto thead th { border-top: 0; background: var(--ink); color: #fff; font-size: .82rem; font-weight: 700; vertical-align: bottom; }
.prose .hinnasto thead th small { display: block; font-weight: 400; opacity: .8; }
.prose .hinnasto td:not(:first-child), .prose .hinnasto thead th:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Sarakeotsikot saavat rivittyä (Nuori ja opiskelija), jotta hinnasto mahtuu mobiiliin; hinnat pysyvät yhdellä rivillä. */
.prose .hinnasto thead th:not(:first-child) { white-space: normal; }
.prose .hinnasto tr.ryhma th { background: var(--cream); color: var(--ink); font-size: .9rem; text-align: left; box-shadow: inset 4px 0 0 var(--red); }
.prose .hinnasto tbody tr:not(.ryhma):hover td { background: var(--cream); }
@media (max-width: 480px) { .prose table.hinnasto { font-size: .86rem; } .prose .hinnasto th, .prose .hinnasto td { padding: .5rem .45rem; } }
/* Korostus sivun alkuun (.joulu: lumihiutalekuvio), yhteyskortit (esim. joulupukkirekisteri, artikkeli 914) ja painikkeet. */
.prose .korostus { position: relative; overflow: hidden; margin: 0 0 1.5rem; padding: 1.4rem 1.5rem; border-radius: var(--radius); background: var(--red); color: #fff; }
.prose .korostus.joulu { background-color: var(--red);
  background-image: radial-gradient(rgba(255, 255, 255, .32) 1.6px, transparent 1.8px), radial-gradient(rgba(255, 255, 255, .18) 1.1px, transparent 1.3px);
  background-size: 38px 38px, 24px 24px; background-position: 0 0, 12px 17px; }
.prose .korostus strong { display: block; font-size: 1.45rem; line-height: 1.2; letter-spacing: -.01em; }
.prose .korostus p { margin: .45rem 0 0; max-width: 60ch; }
.prose .yhteyskortit { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.prose .yhteyskortti { display: flex; flex-direction: column; gap: .7rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 12px; background: var(--paper); }
.prose .yhteyskortti > * { margin: 0; }
.prose .yhteyskortti-otsikko { display: flex; justify-content: space-between; align-items: flex-start; gap: .7rem; }
.prose .yhteyskortti-otsikko strong { font-size: 1.05rem; line-height: 1.3; }
.prose .hintamerkki { flex: none; padding: .2rem .65rem; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 800; font-size: .9rem; white-space: nowrap; }
.prose .yhteyskortti .kuvaus { color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.prose .yhteystiedot { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.prose .yhteyskortti .osoite { margin-top: -.3rem; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.prose a.painike { display: inline-flex; align-items: center; max-width: 100%; padding: .5rem .95rem; border: 2px solid var(--red); border-radius: 999px; background: var(--red);
  color: #fff; font-size: .92rem; font-weight: 700; line-height: 1.25; text-decoration: none; overflow-wrap: anywhere; }
.prose a.painike:hover, .prose a.painike:focus-visible { background: var(--red-dark); border-color: var(--red-dark); }
.prose a.painike.toissijainen { background: transparent; color: var(--red-dark); }
.prose a.painike.toissijainen:hover, .prose a.painike.toissijainen:focus-visible { background: var(--red-soft); }
.prose .tietolaatikko { margin: 1.2rem 0; padding: .9rem 1.1rem; border-radius: 12px; background: var(--cream); border: 1px solid var(--line); }
.prose .tietolaatikko > :first-child { margin-top: 0; }
.prose .tietolaatikko > :last-child { margin-bottom: 0; }

/* Joomlan sivunrakentajan painike (sppb-btn) sivuston painikkeena; sen oma valkoinen teksti poistetaan sisällöstä. */
.prose .sppb-btn { margin: 1rem 0; }
.prose .sppb-btn a { display: inline-block; padding: .6rem 1.15rem; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; text-decoration: none; }
.prose .sppb-btn a:hover, .prose .sppb-btn a:focus-visible { background: var(--red-dark); text-decoration: underline; }
/* Vanhan teeman [block]-laatikko ja [testimonial]-lainaus (Sisalto::expandTags). */
.sisalto-laatikko { display: block; margin: 1rem 0; padding: .85rem 1.1rem; border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 0 10px 10px 0; background: var(--paper); }
.prose blockquote.lainaus, .lainaus { display: block; margin: 1.2rem 0; padding: .9rem 1.2rem; border-left: 4px solid var(--red); border-radius: 0 10px 10px 0; background: var(--cream); font-size: 1.05rem; }
.lainaus p { margin: 0; }
.lainaus footer, .lainaus-nimi { display: block; margin-top: .5rem; color: var(--muted); font-size: .92rem; font-style: normal; }
.lainaus-teksti { display: block; }
.prose blockquote { margin: 1rem 0; padding: .4rem 1rem; border-left: 4px solid var(--yellow); background: var(--yellow-soft); border-radius: 0 8px 8px 0; }
.category-description { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1rem; max-width: none; }
.listing { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .65rem; }
.listing li a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; text-decoration: none; }
.listing li a:hover { border-color: var(--red); }
.listing h3 { margin: .2rem 0 .25rem; font-size: 1.08rem; line-height: 1.3; }
.listing p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.listing .meta { font-size: .82rem; }
.listing mark { background: var(--yellow-soft); color: inherit; border-radius: 3px; }
/* Tavalliset kategorialistat ruudukkona; kortit venyvät rivin korkeimman mittaisiksi. */
.listing-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; }
.listing-grid li { display: flex; }
.listing-grid li a { flex: 1; }

/* Lounasravintolat: kortit, etäisyys Kauppatorilta ja järjestyspainikkeet (osat/ravintolakortit.php) */
.ravintolat-ohjaus { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 1.2rem 0 .2rem; font-size: .92rem; }
.ravintolat-ohjaus[hidden] { display: none; }
.ravintolat-ohjaus span { color: var(--muted); margin-right: .2rem; }
.ravintolat-ohjaus button { font: inherit; font-weight: 650; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: .38rem .95rem; cursor: pointer; }
.ravintolat-ohjaus button:hover { border-color: var(--red); }
.ravintolat-ohjaus button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ravintolakortit { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.ravintolakortit li { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.15rem; }
.ravintolakortit h3 { margin: 0 0 .4rem; font-size: 1.1rem; line-height: 1.3; }
.ravintolakortit h3 a { text-decoration: none; }
.ravintolakortit h3 a:hover { color: var(--red); }
.ravintola-matka { align-self: flex-start; margin: 0 0 .7rem; padding: .12rem .62rem; border-radius: 999px; background: var(--red-soft); color: var(--red-dark); font-size: .82rem; font-weight: 700; }
.ravintolakortit dl { margin: 0; display: grid; gap: .3rem; font-size: .92rem; }
.ravintolakortit dl div { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: .5rem; }
.ravintolakortit dt { color: var(--muted); }
.ravintolakortit dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.ravintolakortit dd a { color: inherit; }
.ravintola-linkit { margin: auto 0 0; padding-top: .8rem; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .9rem; }
.ravintola-linkit a { color: var(--red-dark); font-weight: 650; overflow-wrap: anywhere; }
.ravintolat-huom { font-size: .85rem; }
.article-list { margin: 0 0 1rem; padding-left: 1.2rem; }
.article-list li { margin: .35rem 0; }
.subcategories { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.subcategories li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; font-size: .92rem; }
.subcategories a { font-weight: 650; text-decoration: none; }
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.5rem 0 2rem; }
.pagination a { min-width: 2.4rem; text-align: center; padding: .45rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font-weight: 650; }
.pagination a[aria-current="page"] { background: var(--red); border-color: var(--red); color: #fff; }
.side-search { margin: 0; }
.search-page { margin: 0 0 .75rem; max-width: none; }
.home-intro { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; max-width: none; }
main { min-height: 60vh; padding-bottom: 2rem; }
.narrow > .article-head, .wide-page > .article-head { margin-top: 1.75rem; }

/* Kuntasivut ja työpaikat */
.kuntanav { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: thin; padding: .2rem 0 .7rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line); }
.kuntanav a { flex: none; white-space: nowrap; text-decoration: none; font-size: .9rem; font-weight: 650; padding: .38rem .8rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.kuntanav a:hover { border-color: var(--red); }
.kuntanav .kuntanav-home { background: var(--red); border-color: var(--red); color: #fff; }
.kuntanav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.kunta-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; margin: 1.6rem 0 .5rem; }
.kunta-card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.kunta-card:hover { border-color: var(--red); box-shadow: 0 8px 22px rgba(210, 31, 43, .12); }
.kunta-card small { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.kunta-card strong { display: block; font-size: 1.35rem; margin: .1rem 0 .5rem; letter-spacing: -.02em; }
.kunta-card-stats { display: grid; gap: .15rem; font-size: .86rem; color: var(--ink-2); }
.kunta-card-stats b { color: var(--red); }
.service-text { display: grid; flex: 1 1 auto !important; min-width: 0; width: auto !important; height: auto !important; background: none !important; font-size: inherit !important; place-items: start !important; }
.service-text b, .service-text small { overflow-wrap: anywhere; }
.service-text small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.job-list { list-style: none; margin: .8rem 0 1rem; padding: 0; display: grid; gap: .55rem; }
.job-list li { display: grid; gap: .1rem; }
.job-list a { font-weight: 650; line-height: 1.3; }
.job-list span { font-size: .8rem; color: var(--muted); }
.jobs-box .job-list span { color: rgba(255, 255, 255, .7); }
.jobs-box .job-list a { color: #fff; }
.job-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.job-group { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; scroll-margin-top: 1rem; }
.job-group h2 { margin: 0; font-size: 1.25rem; }
.job-group h2 .muted { font-weight: 500; }
.job-group .more { color: var(--red); font-weight: 750; text-decoration: none; }
.job-group .more:hover { text-decoration: underline; }

/* Listasivujen sivuvalikko: päätösten toimielimet ja vuodet, työpaikkojen kunnat */
.list-layout { grid-template-columns: minmax(0, 1fr) 300px; }
.list-layout .listing { margin-top: 0; }
.listnav-aside { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.listnav-side, .listnav-mobile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.listnav-side { padding: .8rem .7rem; }
.listnav-side h2, .listnav-mobile h2 { margin: .3rem .6rem .45rem; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.listnav-list { list-style: none; margin: 0 0 .9rem; padding: 0; display: grid; gap: .1rem; }
.listnav-list a { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .42rem .6rem; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .92rem; line-height: 1.25; }
.listnav-list a:hover { background: var(--cream); }
.listnav-list a[aria-current="page"], .listnav-years a[aria-current="page"] { background: var(--red); border-color: var(--red); color: #fff; }
.listnav-side .count, .listnav-mobile .count { font-size: .8rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.listnav-side a[aria-current="page"] .count, .listnav-mobile a[aria-current="page"] .count { color: rgba(255, 255, 255, .85); }
.listnav-years { list-style: none; margin: 0 0 .3rem; padding: 0 .4rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.listnav-years a { display: inline-block; padding: .28rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--cream); text-decoration: none; font-weight: 650; font-size: .88rem; }
.listnav-mobile { display: none; margin: 0 0 1rem; }
.listnav-mobile summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: .5rem; padding: .85rem 1rem; }
.listnav-mobile summary::-webkit-details-marker { display: none; }
.listnav-mobile summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.listnav-mobile[open] summary::after { content: '▴'; }
.listnav-mobile nav { padding: 0 .6rem .8rem; }
.listnav-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
@media (max-width: 960px) { .list-layout { grid-template-columns: 1fr; } .listnav-aside { display: none; } .listnav-mobile { display: block; } }

/* Alatunniste: useita linkkiryhmiä, edellinen/seuraava kokous, nostokuvat */
.site-footer .cols { grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr)); }
.meeting-nav { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1.2rem 0 0; }
.meeting-nav a { display: grid; gap: .2rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; text-decoration: none; }
.meeting-nav a:hover { border-color: var(--red); }
.meeting-nav small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.meeting-nav span { font-weight: 650; line-height: 1.3; }
.meeting-next { text-align: right; }
.places .place img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
@media (max-width: 640px) { .meeting-nav { grid-template-columns: 1fr; } .meeting-next { text-align: left; } }
.jobs-box ul.job-list, .jobs-box ul { grid-template-columns: 1fr; }
.jobs-box ul li a { line-height: 1.3; }

/* Katso myös -linkit */
.prose a.katso-myos { color: var(--red-dark); text-decoration-style: dotted; text-underline-offset: 3px; }
.see-also { margin-top: 1.6rem; padding: .9rem 1.1rem; border-radius: 12px; background: var(--cream); border: 1px solid var(--line); }
.see-also strong { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.see-also ul { margin: .35rem 0 0; padding-left: 1.1rem; }

/* Päätösuutisen muut toimielimet */
.other-committees { margin-bottom: 1.6rem; }

/* Työpaikkailmoituksen muut ilmoitukset */
.other-jobs { margin: 1.6rem 0; }
.other-jobs .links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

/* Kunnan ikivihreän sivun Muuta-osio */
.kunta-more { margin: 2rem 0 1rem; }

/* Päätösuutisen otsikko on pitkä (päivä, kunta, toimielin ja asia), joten se on pienempi */
.article-head h1.decision-title { max-width: 32ch; font-size: clamp(1.55rem, 3.1vw, 2.25rem); line-height: 1.14; letter-spacing: -.025em; }
.lead-story h2 { max-width: 28ch; font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.12; letter-spacing: -.025em; }

/* Päätösotsikon kokouspäivä korostettuna kaikissa listoissa */
.pvm-tag { display: inline-block; padding: .02em .42em; margin-right: .08em; border-radius: 6px; background: var(--yellow); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.decision-title .pvm-tag { padding: 0 .3em; border-radius: 8px; }

/* Kuntakortti, jonka luvut ovat linkkejä: kortin nimi on koko kortin linkki, luvut omia linkkejään */
.kunta-card.linked { position: relative; }
.kunta-card-name { margin: .1rem 0 .55rem; font-size: 1.35rem; letter-spacing: -.02em; }
.kunta-card-name a { color: inherit; text-decoration: none; }
.kunta-card-name a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.kunta-card.linked .kunta-card-stats a { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: .6rem; margin: 0 -.5rem; padding: .32rem .5rem; border-radius: 8px; text-decoration: none; color: var(--ink-2); }
.kunta-card.linked .kunta-card-stats a:hover { background: var(--cream); }
.kunta-card.linked .kunta-card-stats a span:first-child { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.kunta-stats a { color: inherit; text-decoration: none; }
.kunta-stats a:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* Avainsanasivun päätösmaininnat */
.mentions { margin: 1.6rem 0; }
.mentions .muted { margin: .7rem 0 0; font-size: .9rem; }

/* Mega-valikko (työpöytä): paneeli avautuu päävalikon alle hiirellä tai näppäimistöllä, kun app.js on ladannut sisällön */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); color: var(--ink); border-top: 3px solid var(--yellow); box-shadow: 0 22px 44px rgba(30, 26, 27, .18); padding: 1.5rem 0 1.7rem; visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
.mainnav li.mega-ready:hover > .mega, .mainnav li.mega-ready:focus-within > .mega { visibility: visible; opacity: 1; transform: none; transition-delay: .09s, .09s, 0s; }
.mainnav li.mega-ready > .navlink::after { content: '▾'; font-size: .72em; margin-left: .4em; opacity: .85; }
.mega-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2.2rem; }
.mega h2 { margin: 0 0 .55rem; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.mega-places { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .2rem .7rem; }
.mega-places a { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .48rem .65rem; border-radius: 9px; color: var(--ink); text-decoration: none; }
.mega-places a:hover, .mega-places a:focus-visible { background: var(--cream); }
.mega-places strong { font-weight: 750; }
.mega-places span { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.mega-features { list-style: none; margin: 0 0 1.1rem; padding: .9rem 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.mega-features a { display: flex; flex-direction: column; gap: .1rem; padding: .65rem .85rem; border-radius: 10px; background: var(--yellow-soft); color: var(--ink); text-decoration: none; }
.mega-features a:hover, .mega-features a:focus-visible { background: var(--yellow); }
.mega-features strong { font-weight: 750; }
.mega-features span { font-size: .8rem; color: var(--ink-2); }
.mega-latest { border-left: 1px solid var(--line); padding-left: 2rem; }
.mega-latest ul { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: .7rem; }
.mega-latest li a { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); text-decoration: none; font-weight: 650; font-size: .9rem; line-height: 1.32; }
.mega-latest li a:hover { color: var(--red); }
.mega-latest small { display: block; margin-top: .15rem; color: var(--muted); font-size: .76rem; }
.mega-links li a { -webkit-line-clamp: 1; }
@media (max-width: 960px) { .mega { display: none; } .mainnav li.mega-ready > .navlink::after { content: none; } }
.mainnav li.mega-ready.mega-closed > .mega { visibility: hidden; opacity: 0; }
.kunta-card.maakunta-card { background: var(--yellow-soft); border-color: #F3DFA0; }

/* Kelikamerat: matkailukohteen lähimmät tiekamerat */
.cameras { margin: 1.8rem 0; }
.cameras-intro { max-width: 72ch; margin: 0 0 1rem; color: var(--ink-2); }
.camera-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.camera { margin: 0; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.camera img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--cream); }
.camera figcaption { display: grid; gap: .15rem; padding: .7rem .85rem .85rem; font-size: .86rem; color: var(--ink-2); }
.camera figcaption strong { color: var(--ink); font-size: .95rem; }
.camera-badge { justify-self: start; margin-bottom: .2rem; padding: .12rem .55rem; border-radius: 999px; background: var(--ink); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.camera-distance { font-weight: 700; color: var(--red-dark); }
.cameras-source { margin: .7rem 0 0; font-size: .8rem; color: var(--muted); }
/* Sivupalsta alkaa vasemman palstan ensimmäisen väliotsikon tasolta eikä jää kiinni yläpuoliseen elementtiin. */
@media (min-width: 961px) {
  .layout:has(> :first-child > .section-head:first-child, > :first-child > section:first-child > .section-head:first-child) > aside { margin-top: 2.75rem; }
}
/* Upotus ennen painallusta (Sisalto::embed): samankokoinen laatikko kuin upotus itse. Video tummana, kartta ja asiakirja vaaleana. */
.upotus { display: flex; align-items: center; justify-content: center; gap: .9rem; width: 100%; aspect-ratio: 16 / 9; margin: 1rem 0; padding: 1rem;
  border-radius: 10px; background: var(--ink); color: #fff; text-decoration: none; text-align: left; }
.prose a.upotus { color: #fff; text-decoration: none; }
.upotus-kartta, .upotus-asiakirja, .prose a.upotus-kartta, .prose a.upotus-asiakirja { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.upotus-kuvake { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--red); color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.upotus:hover .upotus-kuvake, .upotus:focus-visible .upotus-kuvake { transform: scale(1.08); }
.upotus:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.upotus-teksti { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.upotus-teksti strong { font-size: 1.12rem; }
.upotus-nimi { font-weight: 600; overflow-wrap: anywhere; }
.upotus-lahde { font-size: .88rem; opacity: .85; }
iframe.upotus-kehys { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; margin: 1rem 0; background: var(--cream); }
/* Google-lomake on pitkä: kehys lähes ruudun korkuinen, lomake vierii sen sisällä. */
iframe.upotus-kehys-lomake, .prose iframe.upotus-kehys-lomake { aspect-ratio: auto; height: min(85vh, 1100px); }
@media (max-width: 480px) {
  .upotus { flex-direction: column; text-align: center; gap: .6rem; }
  .upotus-teksti { align-items: center; }
}
.video-poissa { display: block; margin: 1rem 0; padding: .9rem 1rem; border-radius: 10px; background: var(--cream); color: var(--muted); font-style: italic; }
.archive-note { margin: 1rem 0 0; padding: .7rem 1rem; border-radius: 10px; background: var(--yellow-soft); color: var(--ink-2); font-size: .92rem; }
.live-poster { position: relative; display: block; }
.live-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px; border-radius: 12px; background: var(--red); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); transition: transform .15s ease; }
.live-play::after { content: ""; position: absolute; left: 26px; top: 13px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.live-poster:hover .live-play, .live-poster:focus-visible .live-play { transform: scale(1.08); }
.live-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.camera-badge.live { background: var(--red); }
/* Iso suora lähetys (kelikamerat.json "iso"): koko rivin levyinen, isompi toistonappi ja kuvateksti rinnakkain. */
.camera-big { grid-column: 1 / -1; border-radius: var(--radius); }
.camera-big .live-play { width: 92px; height: 64px; margin: -32px 0 0 -46px; border-radius: 16px; }
.camera-big .live-play::after { left: 37px; top: 19px; border-width: 13px 0 13px 21px; }
.camera-big figcaption { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: .2rem .7rem; padding: .85rem 1.1rem 1rem; font-size: .9rem; }
.camera-big figcaption strong { font-size: 1.1rem; }
.camera-big figcaption > span:not(.camera-badge) { grid-column: 1 / -1; }
@media (max-width: 640px) { .camera-big { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; } }
/* Kamerasivun tiekamerat: oma osio, asemittain, täysikokoiset kuvat kahdessa sarakkeessa (mobiilissa yksi). */
.road-cams { margin-top: 2.2rem; }
.road-cams-head { margin: 0 0 .35rem; font-size: 1.35rem; }
.road-station { margin-top: 1.4rem; }
.road-station h4 { margin: 0 0 .55rem; font-size: 1.05rem; }
.road-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.road-grid .camera figcaption { padding: .55rem .8rem .65rem; }
@media (max-width: 640px) { .road-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .live-play { transition: none; } }
.source-compact { position: relative; display: flex; justify-content: flex-end; }
.source-info { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border: 1px solid var(--muted); border-radius: 50%; color: var(--muted); font: italic 700 .75rem/1 Georgia, serif; cursor: help; }
.source-info:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.source-text { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 2; padding: .4rem .65rem; border-radius: 8px; background: var(--ink); color: #fff; font-size: .78rem; white-space: nowrap; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.source-text a { color: #fff; }
.source-compact:hover .source-text, .source-compact:focus-within .source-text { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .source-text { transition: none; } }
/* Etusivun työpaikat: jokainen ilmoitus omana rivinään (tehtävä, työnantaja, kunta ja julkaisupäivä), rivien välissä erotinviiva. */
.jobs-box ul.job-cards { display: block; margin: 0 0 1rem; }
.job-cards li + li { border-top: 1px solid rgba(255, 255, 255, .14); }
.job-cards a { display: grid; gap: .2rem; padding: .65rem .4rem; margin: 0 -.4rem; border-radius: 8px; text-decoration: none; }
.job-cards a:hover, .job-cards a:focus-visible { background: rgba(255, 255, 255, .07); }
.job-cards strong { color: #fff; font-size: .95rem; font-weight: 700; line-height: 1.3; }
.job-cards a:hover strong { color: var(--yellow); }
.job-employer { color: #CFC8C4; font-size: .84rem; line-height: 1.3; }
.job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; color: rgba(255, 255, 255, .6); font-size: .76rem; }
.job-place { padding: .05rem .5rem; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 700; }
/* Työpaikat-sivu: ilmoitukset riveinä, vasemmalla päivämääräruutu (uusi ilmoitus keltaisella), tehtävä ja työnantaja. */
.job-group h2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; }
.job-count { padding: .15rem .65rem; border-radius: 999px; background: var(--red-soft); color: var(--red-dark); font-size: .82rem; font-weight: 750; white-space: nowrap; }
.job-rows { list-style: none; margin: .8rem 0 1rem; padding: 0; }
.job-rows li + li { border-top: 1px solid var(--line); }
.job-rows a { display: grid; grid-template-columns: 3.3rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .65rem .5rem; margin: 0 -.5rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
.job-rows a:hover, .job-rows a:focus-visible { background: var(--cream); }
.job-date { display: grid; place-content: center; justify-items: center; width: 3.3rem; height: 3.3rem; border-radius: 10px; background: var(--cream); border: 1px solid var(--line); line-height: 1.1; font-variant-numeric: tabular-nums; }
.job-date b { font-size: .98rem; font-weight: 800; letter-spacing: -.01em; }
.job-date small { color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.job-date.is-new { background: var(--yellow); border-color: var(--yellow); }
.job-date.is-new small { color: var(--ink); }
.job-text { display: grid; gap: .15rem; min-width: 0; }
.job-text strong { font-size: .97rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.job-rows a:hover strong { color: var(--red); }
.job-org { color: var(--muted); font-size: .85rem; line-height: 1.3; }
.job-new { align-self: start; padding: .12rem .5rem; border-radius: 999px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
/* Uusi-korostus päätös- ja työpaikkalistoilla (Rakentaja::NEW_DAYS): punainen merkki ja vasen reunaviiva. Työpaikkalistalla vanhojen päivämäärä neutraalina, uusien keltaisena. */
.new-badge { display: inline-block; margin-left: .4rem; padding: .08rem .5rem; border-radius: 999px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; vertical-align: .1em; }
.listing li.is-new a { border-color: var(--red-soft); box-shadow: inset 4px 0 0 var(--red); }
.job-listing li:not(.is-new) .pvm-tag { background: var(--cream); border: 1px solid var(--line); }
/* Päätöksen yläosa: julkaisuhallinnan päätöskortti (1080 × 1350) ja Lyhyesti rinnakkain, mobiilissa allekkain.
   Kortti näkyy aina kokonaan (käyttäjän toive 31.10.2026: ei rajausta). Kuva avaa kortin täysikokoisena. */
.decision-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; margin-top: 1rem; }
.decision-card-image { min-width: 0; margin: 0; }
.decision-card-image a { display: block; overflow: hidden; max-width: 420px; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(30, 26, 27, .14); }
.decision-card-image img { display: block; width: 100%; height: auto; }
/* Ilman Lyhyesti-laatikkoa kortti on tekstin alussa, ja leveällä näytöllä teksti kiertää sen oikealta puolelta. */
.decision-card-float { margin: .2rem 0 1.2rem; }
.prose.has-card { display: flow-root; }
@media (min-width: 720px) {
  .decision-hero { grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); align-items: start; }
  .decision-hero .summary-box { margin: 0; }
  .decision-card-float { float: left; width: min(290px, 45%); margin: .35rem 1.5rem 1rem 0; }
}

/* Ajankohtaista: Nyt-kooste, aikajana, tapahtumat kalenterilehtinä, päätökset ja työpaikat tulopäivittäin */
.now-head h1 { margin-bottom: .4rem; }
.now-head .muted { max-width: 62ch; margin: 0 0 1.1rem; font-size: 1rem; }

/* Nyt-osio: tumma tilannekortti ja uusin päätöskortti rinnakkain */
.now { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 1rem; align-items: stretch; }
.now-main { display: flex; flex-direction: column; padding: clamp(1.1rem, 2.6vw, 1.7rem); border-radius: var(--radius); background: var(--ink); color: #fff; }
.now-day { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .65rem; margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.15; }
.now-label { padding: .1rem .55rem; border-radius: 999px; background: var(--red); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.now-pulse { flex: none; width: .75rem; height: .75rem; border-radius: 50%; background: var(--red); animation: pk-pulse 2.4s ease-out infinite; }
@keyframes pk-pulse { 0% { box-shadow: 0 0 0 0 rgba(210, 31, 43, .65); } 70% { box-shadow: 0 0 0 .75rem rgba(210, 31, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(210, 31, 43, 0); } }
.now-stats { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.now-stats a { display: block; height: 100%; padding: .75rem .85rem; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.now-stats a:hover, .now-stats a:focus-visible { background: rgba(255, 255, 255, .15); }
.now-stats b { display: block; color: var(--yellow); font-size: clamp(1.7rem, 3.4vw, 2.35rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.now-stats span { display: block; margin-top: .3rem; color: #E6E0DC; font-size: .8rem; line-height: 1.3; }
.now-sub { margin: 1.15rem 0 .45rem; color: #CFC8C4; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.now-next { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; align-items: center; padding: .7rem .9rem; border-radius: 12px; background: var(--yellow); color: var(--ink); text-decoration: none; }
.now-next:hover strong, .now-next:focus-visible strong { text-decoration: underline; }
.now-next small { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.now-next strong { display: block; font-size: 1.02rem; line-height: 1.25; }
.now-place { display: block; font-size: .82rem; }
.now-next small:empty { display: none; }
.now-next[hidden], .now-later li[hidden] { display: none; }
.now-later { list-style: none; margin: .35rem 0 0; padding: 0; }
.now-later a { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: .8rem; align-items: baseline; padding: .5rem .2rem; border-bottom: 1px solid rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }
.now-later a:hover strong, .now-later a:focus-visible strong { color: var(--yellow); }
.now-later-date { color: var(--yellow); font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.now-later strong { font-size: .92rem; font-weight: 700; }
.now-later-place { color: #CFC8C4; font-size: .82rem; }
.now-built { margin: auto 0 0; padding-top: .9rem; color: #CFC8C4; font-size: .76rem; }
.now-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; }
.now-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center bottom; transition: transform .3s ease; }
.now-card:hover img, .now-card:focus-visible img { transform: scale(1.03); }
.now-card-text { display: grid; gap: .3rem; padding: .75rem .9rem .9rem; }
.now-card-text small { color: var(--red-dark); font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.now-card-text strong { font-size: .95rem; line-height: 1.3; }
.now-card:hover strong { color: var(--red); }

/* Kalenterilehti: päivä, kuukausi ja viikonpäivä; punainen yläreuna kuin repäisykalenterissa */
.ev-date { position: relative; align-self: start; display: grid; justify-items: center; align-content: start; width: 4.1rem; padding: .7rem 0 .45rem; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); line-height: 1.05; text-align: center; font-variant-numeric: tabular-nums; }
.ev-date::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: .42rem; border-radius: 10px 10px 0 0; background: var(--red); }
.ev-date .wd { color: var(--red-dark); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ev-date b { font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em; }
.ev-date .mo { color: var(--muted); font-size: .7rem; font-weight: 700; }
.ev-date.is-range b { font-size: 1.12rem; padding: .32rem 0 .2rem; letter-spacing: -.02em; }
.ev-date.is-range { box-shadow: 3px 3px 0 -1px var(--paper), 3px 3px 0 0 var(--line), 6px 6px 0 -1px var(--paper), 6px 6px 0 0 var(--line); }
.ev-date.small { width: 3.3rem; padding-top: .55rem; background: #fff; border-color: rgba(30, 26, 27, .15); }
.ev-date.small b { font-size: 1.35rem; }
.ev-date.small.is-range b { font-size: .95rem; }

/* Loppuvuoden aikajana: päivät suhteessa toisiinsa, viikonloput ja juhlapäivät taustalla */
.yearline .section-head { margin-top: 2.2rem; }
.yl { --dw: calc(100% / var(--days)); padding: .9rem 1.2rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.yl-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; margin: 0 0 .5rem; font-size: .85rem; }
.yl-now { font-weight: 800; }
.yl-now::before { content: ""; display: inline-block; width: .6rem; height: .6rem; margin-right: .4rem; border-radius: 50%; background: var(--ink); vertical-align: .02em; }
.yl-left { color: var(--muted); }
.yl-scale { position: relative; }
.yl-months { position: relative; height: 1.35rem; }
.yl-months span { position: absolute; left: var(--x); width: var(--w); padding-left: .4rem; border-left: 2px solid var(--line); color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .07em; line-height: 1.35rem; text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.yl-track { position: relative; height: calc(var(--lanes) * 20px + 14px); border-radius: 8px; background-color: var(--cream);
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--dw) * var(--wk)), rgba(30, 26, 27, .075) calc(var(--dw) * var(--wk)) calc(var(--dw) * (var(--wk) + 2)), transparent calc(var(--dw) * (var(--wk) + 2)) calc(var(--dw) * (var(--wk) + 7))); }
.yl-today { position: absolute; z-index: 2; left: var(--today); top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); }
.yl-ev { position: absolute; z-index: 1; left: var(--x); top: calc(7px + var(--lane) * 20px); width: 13px; height: 13px; margin-left: -6.5px; border: 2px solid var(--paper); border-radius: 50%; background: var(--red); box-shadow: 0 0 0 1px var(--red); transition: box-shadow .15s ease; }
.yl-ev.is-range { width: max(13px, var(--w)); margin-left: 0; border-radius: 99px; }
.yl-ev:hover { z-index: 3; box-shadow: 0 0 0 1px var(--red), 0 0 0 5px rgba(210, 31, 43, .22); }
.yl-ev::after { content: attr(data-label); display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: .3rem .55rem; border-radius: 7px; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 650; line-height: 1.3; white-space: nowrap; pointer-events: none; }
.yl-ev.is-start::after { left: 0; transform: none; }
.yl-ev.is-end::after { left: auto; right: 0; transform: none; }
.yl-ev:hover::after { display: block; }
.yl-ev.is-past { opacity: .25; }
.yl-hols { position: relative; height: 2.5rem; }
.yl-hol { position: absolute; left: var(--x); top: calc(.45rem + var(--row) * 1rem); transform: translateX(-50%); color: var(--ink-2); font-size: .7rem; line-height: 1; white-space: nowrap; }
.yl-hol::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 2px; height: calc(.45rem + var(--row) * 1rem); margin-left: -1px; background: var(--yellow); }
.yl-hol b { font-weight: 800; }
.yl-hol.is-end { transform: translateX(calc(-100% + .3rem)); }
.yl-hol.is-end::before { left: auto; right: .2rem; }
.yl-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .35rem 0 0; color: var(--muted); font-size: .74rem; }
.yl-legend i { display: inline-block; margin-right: .35rem; vertical-align: -.05em; }
.lg-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--red); }
.lg-bar { width: 1.3rem; height: .7rem; border-radius: 99px; background: var(--red); }
.lg-we { width: .9rem; height: .7rem; border-radius: 2px; background: rgba(30, 26, 27, .14); }
.lg-hol { width: 3px; height: .8rem; background: var(--yellow); box-shadow: 0 0 0 1px #E3A800; }

/* Tulevat tapahtumat: kuukausittain kalenterikortteina */
.month-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin: 1.5rem 0 .7rem; font-size: 1.15rem; }
.month-head small { color: var(--muted); font-size: .82rem; font-weight: 600; }
.month[hidden] { display: none; }
.agenda { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.ev { scroll-margin-top: 1rem; }
.ev[hidden] { display: none; }
.ev > a { display: grid; grid-template-columns: 4.1rem minmax(0, 1fr); gap: .9rem; height: 100%; padding: .85rem .9rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.ev > a:hover, .ev > a:focus-visible { border-color: var(--red); box-shadow: 0 10px 24px rgba(30, 26, 27, .08); transform: translateY(-2px); }
.ev-body { display: grid; align-content: start; gap: .3rem; min-width: 0; }
.ev-body strong { font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.ev > a:hover strong { color: var(--red); }
.ev-desc { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.ev-when { display: flex; flex-wrap: wrap; gap: .1rem .45rem; color: var(--red-dark); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ev-when:not(:has(*:not(:empty))) { display: none; }
.ev-when [data-when]:empty { display: none; }
.ev-when [data-when]:not(:empty) + .ev-len::before { content: "· "; }
.ev.is-soon [data-when] { padding: 0 .4rem; border-radius: 4px; background: var(--yellow); color: var(--ink); }
.ev.is-now [data-when] { padding: 0 .4rem; border-radius: 4px; background: var(--red); color: #fff; }
.ev.is-now .ev-date { border-color: var(--red); background: var(--red-soft); }
.ev:target > a { border-color: var(--red); animation: pk-flash 1.8s ease-out 1; }
@keyframes pk-flash { 0% { box-shadow: 0 0 0 6px rgba(255, 194, 26, .95); } 100% { box-shadow: 0 0 0 0 rgba(255, 194, 26, 0); } }
.kunta-events { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.kunta-events a { display: grid; gap: .1rem; height: 100%; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-decoration: none; }
.kunta-events a:hover, .kunta-events a:focus-visible { border-color: var(--red); }
.kunta-events strong { font-size: .95rem; }
.kunta-events span { color: var(--muted); font-size: .76rem; line-height: 1.3; }

/* Päätökset päivä päivältä: pystysuora aikajana, päivän solmu ja päivän päätökset kortissa */
.stream-intro { margin: -.4rem 0 .9rem; color: var(--muted); font-size: .88rem; }
.stream { position: relative; list-style: none; margin: 0; padding: 0 0 0 1.75rem; }
.stream::before { content: ""; position: absolute; left: .5rem; top: .55rem; bottom: .8rem; width: 2px; border-radius: 2px; background: linear-gradient(var(--red), var(--line) 30%); }
.stream-day + .stream-day { margin-top: 1.35rem; }
.stream-head { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .55rem; margin: 0 0 .5rem; font-size: 1.08rem; line-height: 1.3; }
.stream-head::before { content: ""; position: absolute; left: -1.75rem; top: .2rem; width: 1.05rem; height: 1.05rem; border: 3px solid var(--ink); border-radius: 50%; background: var(--cream); box-sizing: border-box; }
.stream-day:first-child .stream-head::before { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.stream-head .rel { color: var(--red-dark); }
.stream-head small { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stream-items { list-style: none; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.stream-items li + li { border-top: 1px solid var(--line); }
.stream-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; align-items: start; padding: .8rem 1rem; color: var(--ink); text-decoration: none; }
.stream-item.has-thumb { grid-template-columns: minmax(0, 1fr) 64px; }
.stream-item:hover, .stream-item:focus-visible { background: var(--cream); }
.stream-item strong { display: block; margin-top: .3rem; font-size: 1rem; line-height: 1.32; overflow-wrap: anywhere; }
.stream-item:hover strong { color: var(--red); }
.stream-item .thumb { width: 64px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; }
.kokous .pvm-tag { font-size: .78rem; font-weight: 750; }
.stream-item .meta { gap: .3rem .5rem; }
.stream-more { display: inline-block; margin-top: .45rem; color: var(--red); font-size: .88rem; font-weight: 750; text-decoration: none; }
.stream-more:hover { text-decoration: underline; }

/* Sivupalsta: työpaikat päivittäin, kamerat ja arkisto */
.jobs-day { margin: .9rem 0 .1rem; color: #CFC8C4; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.jobs-box ul.job-cards { margin-bottom: .2rem; }
.jobs-more { display: inline-block; margin: 0 0 .8rem; color: var(--yellow); font-size: .84rem; font-weight: 750; text-decoration: none; }
.jobs-more:hover { text-decoration: underline; }
.jobs-box .button { margin-top: .6rem; }
.live-links, .archive-list { list-style: none; margin: 0; padding: 0; }
.live-links li + li, .archive-list li + li { border-top: 1px solid var(--line); }
.live-links a { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; text-decoration: none; }
.live-links strong { display: block; font-size: .95rem; }
.live-links small { color: var(--muted); font-size: .78rem; }
.live-links a:hover strong { color: var(--red); }
.live-dot { flex: none; width: .65rem; height: .65rem; border-radius: 50%; background: var(--red); animation: pk-pulse 2.4s ease-out infinite; }
.archive-list a { display: grid; gap: .1rem; padding: .55rem 0; text-decoration: none; }
.archive-list time { color: var(--muted); font-size: .76rem; font-weight: 750; }
.archive-list span { font-size: .9rem; font-weight: 650; line-height: 1.3; }
.archive-list a:hover span { color: var(--red); }
.archive-hint { margin: .5rem 0 0; color: var(--muted); font-size: .78rem; }

@media (max-width: 960px) {
  .now { grid-template-columns: minmax(0, 1fr) 220px; }
}
@media (max-width: 720px) {
  .now { grid-template-columns: minmax(0, 1fr); }
  .now-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); }
  .now-card img { align-self: start; aspect-ratio: 4 / 5; object-position: center; }
  .agenda { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .now-stats { gap: .4rem; }
  .now-stats a { padding: .6rem .6rem; }
  .now-stats span { font-size: .74rem; }
  .yl { padding: .8rem .8rem .9rem; }
  .yl-hol { font-size: .64rem; }
  .yl-hol b { display: none; }
  .agenda { gap: .5rem; }
  .ev > a { grid-template-columns: 3.4rem minmax(0, 1fr); gap: .75rem; padding: .65rem .75rem; }
  .ev-body { gap: .2rem; }
  .ev-desc { display: none; }
  .ev-date { width: 3.4rem; padding: .55rem 0 .35rem; }
  .ev-date b { font-size: 1.4rem; }
  .ev-date.is-range b { font-size: .92rem; padding: .2rem 0 .1rem; }
  .now-later a { grid-template-columns: 5.4rem minmax(0, 1fr); }
  .stream { padding-left: 1.45rem; }
  .stream::before { left: .4rem; }
  .stream-head::before { left: -1.45rem; }
  .stream-item { padding: .75rem .8rem; }
  .stream-item.has-thumb { grid-template-columns: minmax(0, 1fr) 52px; gap: .7rem; }
  .stream-item .thumb { width: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .now-pulse, .live-dot { animation: none; }
  .now-card img, .ev > a, .yl-ev { transition: none; }
  .now-card:hover img, .now-card:focus-visible img, .ev > a:hover, .ev > a:focus-visible { transform: none; }
  .ev:target > a { animation: none; box-shadow: 0 0 0 4px var(--yellow); }
}

/* Kuntasirut ankkurilinkkeinä Tapahtumat kunnittain -ruutuihin (toimii ilman JavaScriptiä), tyhjä tila ja myöhemmät tapahtumat */
.ajk-sirut { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 .4rem; padding: 0; list-style: none; }
.ajk-sirut a { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.2rem; padding: .25rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: .84rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.ajk-sirut a:hover, .ajk-sirut a:focus-visible { border-color: var(--red); }
.ajk-maara { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem; border-radius: 999px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; }
.ajk-tyhja { margin: .8rem 0 0; padding: 1rem 1.1rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--paper); color: var(--muted); }
.ajk-myohemmat { margin-top: 1rem; }
.ajk-myohemmat > summary { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border: 1px solid var(--red); border-radius: 999px; color: var(--red); font-weight: 750; cursor: pointer; list-style: none; }
.ajk-myohemmat > summary::-webkit-details-marker { display: none; }
.ajk-myohemmat > summary::after { content: "▾"; }
.ajk-myohemmat[open] > summary::after { content: "▴"; }
.kunta-events li { scroll-margin-top: 1rem; }
.kunta-events li:target a { border-color: var(--red); animation: pk-flash 1.8s ease-out 1; }
.ajk-uutiset .listing { margin-top: 0; }

/* Työpaikkojen kuntapylväät: luku aina tekstinä, pylväs vain havainnollistaa */
.pylvas-otsikko { margin: 1rem 0 .5rem; color: #CFC8C4; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.jobs-box ul.kuntapylvaat { display: block; margin: 0 0 1rem; }
.kuntapylvaat a { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr) 2.3rem; gap: .6rem; align-items: center; margin: 0 -.3rem; padding: .18rem .3rem; border-radius: 6px; color: #fff; font-size: .84rem; font-weight: 600; text-decoration: none; }
.kuntapylvaat a:hover, .kuntapylvaat a:focus-visible { background: rgba(255, 255, 255, .08); }
.kuntapylvaat a:hover .pylvas-nimi { text-decoration: underline; }
.pylvas { position: relative; height: .6rem; border-radius: 0 4px 4px 0; background: rgba(255, 255, 255, .08); }
.pylvas::before { content: ""; position: absolute; inset: 0 auto 0 0; width: max(4px, calc(var(--osuus) * 100%)); border-radius: 0 4px 4px 0; background: var(--yellow); }
.pylvas-luku { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.jobs-box .jobs-day + ul.job-cards { grid-template-columns: minmax(0, 1fr); }

/* Arkisto: vuosileima ja julkaisupäivä, jotta vanha ei näytä tuoreelta */
.archive-list a { grid-template-columns: 3.6rem minmax(0, 1fr); gap: .7rem; align-items: start; }
.archive-list .vuosileima { color: var(--line); font-size: 1.45rem; font-weight: 850; line-height: 1; letter-spacing: -.04em; -webkit-text-stroke: 1px var(--ink-2); font-variant-numeric: tabular-nums; }
.archive-list .archive-title { display: block; font-size: .9rem; font-weight: 650; line-height: 1.3; }
.archive-list small { display: block; margin-top: .15rem; color: var(--muted); font-size: .76rem; }
.archive-list a:hover .archive-title { color: var(--red); }
.archive-list a:hover .vuosileima { color: var(--yellow); }

/* Aikajana vain työpöydällä: mobiilissa päiviä olisi noin 5 px kohden, ja sama tieto on heti listana. */
@media (max-width: 767px) { .yearline { display: none; } }
@media (max-width: 640px) {
  .ajk-sirut { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .ajk-sirut::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .kunta-events li:target a { animation: none; box-shadow: 0 0 0 4px var(--yellow); }
}

/* Alatunniste mobiilissa: myöhempi .cols-sääntö (minmax(220px) + 150px) leveni 418 px:iin 390 px:n näytöllä. Kaksi palstaa, ensimmäinen koko leveydelle. */
@media (max-width: 640px) { .site-footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-footer .cols > :first-child { grid-column: 1 / -1; } }

/* Evästesuostumus (assets/suostumus.js): keskellä ruutua oleva ikkuna himmennetyn sivun päällä. */
.footer-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.footer-link:hover, .footer-link:focus-visible { color: var(--yellow); }
.suostumus-auki, .suostumus-auki body { overflow: hidden; }
.suostumus { width: min(100% - 32px, 620px); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.suostumus::backdrop { background: rgba(30, 26, 27, .62); animation: suostumus-tausta .2s ease-out; }
.suostumus-sisa { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem 1.6rem 1.4rem; border-radius: var(--radius); background: var(--paper); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); animation: suostumus-sisaan .25s ease-out; }
.suostumus p[hidden] { display: none; }
.suostumus h2 { margin: 0 0 .7rem; font-size: 1.35rem; line-height: 1.2; }
.suostumus h2:focus { outline: none; }
.suostumus p { margin: 0 0 .7rem; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.suostumus a { color: var(--red); font-weight: 650; }
.suostumus-valinnat { display: grid; gap: .5rem; margin-top: .4rem; }
.suostumus-valinnat[hidden] { display: none; }
.suostumus-rivi { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); gap: .65rem; align-items: start; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); font-size: .86rem; line-height: 1.4; cursor: pointer; }
.suostumus-rivi input { width: 1.15rem; height: 1.15rem; margin: .1rem 0 0; accent-color: var(--red); }
.suostumus-rivi strong { display: block; font-size: .95rem; }
.suostumus-napit { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.suostumus-napit .button { justify-content: center; flex: 1 1 12rem; cursor: pointer; font: inherit; font-weight: 750; }
.suostumus-napit .button[hidden] { display: none; }
.suostumus-lisaa { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.suostumus-lisaa h3 { margin: 0 0 .5rem; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.suostumus-lisaa dl { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .45rem .9rem; margin: 0 0 .7rem; font-size: .84rem; line-height: 1.45; }
.suostumus-lisaa dt { font-weight: 750; }
.suostumus-lisaa dd { margin: 0; color: var(--ink-2); }
.suostumus .suostumus-linkki { margin: 1rem 0 0; font-size: .84rem; }
@media (max-width: 520px) {
  .suostumus { width: calc(100% - 24px); }
  .suostumus-sisa { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 1.2rem 1.1rem 1.1rem; }
  .suostumus-lisaa dl { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .suostumus-lisaa dd { margin-bottom: .45rem; }
}
@keyframes suostumus-tausta { from { opacity: 0; } to { opacity: 1; } }
@keyframes suostumus-sisaan { from { transform: translateY(.8rem) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .suostumus::backdrop, .suostumus-sisa { animation: none; } }
@media print { .suostumus { display: none; } }

/* Väestösivut (src/Vaesto.php, src/Kaavio.php): datan väri on sininen eikä brändin punainen; sama väri kasvulle ja vähenemiselle.
   Sininen #2a78d6 ja koulujen kokoluokat saman sävyn vaaleusasteina (dataviz-validaattori 31.10.2026). */
.vaesto { --data: #2a78d6; --data-1: #9ec5f4; --data-2: #5598e7; --data-3: #1c5cab; --data-ref: #6b6461; }
.vaesto-head h1 { margin-bottom: .5rem; }
.vaesto-vastaus { max-width: 62ch; margin: 0 0 .5rem; font-size: 1.12rem; line-height: 1.5; color: var(--ink); }
.vaesto-lahde { margin: 0; color: var(--muted); font-size: .82rem; }
.vaesto-luvut { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.vaesto-luvut li { display: grid; gap: .15rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.vaesto-luvut b { font-size: 1.7rem; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vl-nimi { color: var(--ink-2); font-size: .82rem; font-weight: 700; }
.vl-vertailu { color: var(--muted); font-size: .8rem; }
.vaesto-osa { margin-top: 2.4rem; }
.vaesto-osa > h2 { margin: 0 0 .7rem; font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.vaesto-osa h3 { margin: 1.4rem 0 .5rem; font-size: 1.05rem; }
.kaavio-pari { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.kaavio-kuva { margin: 0; padding: .7rem .8rem .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.kaavio-kuva figcaption { margin-top: .3rem; color: var(--muted); font-size: .78rem; }
.vaesto-osa > .kaavio-kuva { max-width: 680px; }
.kaavio { display: block; width: 100%; max-width: 640px; height: auto; overflow: visible; }
.kaavio text { font: 11px/1 "Archivo", system-ui, sans-serif; fill: var(--ink-2); }
.kaavio .k-akseli { fill: var(--muted); }
.kaavio .k-arvo, .kaavio .k-nimi { font-weight: 700; fill: var(--ink); }
.kaavio .k-hento { fill: var(--muted); }
.kaavio .k-ruudukko { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.kaavio .k-paa, .kaavio-kipina .k-paa { fill: none; stroke: var(--data); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.kaavio .k-vertailu { fill: none; stroke: var(--data-ref); stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.kaavio .k-piste, .kaavio-kipina .k-piste { fill: var(--data); stroke: var(--paper); stroke-width: 2; vector-effect: non-scaling-stroke; }
.kaavio circle.k-piste.k-hento { fill: var(--data-ref); }
.kaavio .k-osuma { fill: transparent; }
.kaavio .k-osuma:hover { fill: rgba(42, 120, 214, .18); }
.kaavio .k-pylvas { fill: var(--data); }
.kaavio .k-pylvas:hover { fill: var(--data-3); }
.kaavio-selite { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .4rem 0 .6rem; color: var(--muted); font-size: .8rem; }
.selite-osa { display: inline-flex; align-items: center; gap: .35rem; }
.selite-palkki { display: inline-block; width: 1.2rem; height: .6rem; border-radius: 0 3px 3px 0; background: var(--data); }
.selite-merkki { display: inline-block; width: 3px; height: .95rem; border-radius: 1px; background: var(--ink); }
.palkit-kaare { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.palkit, .vaesto-taulu { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.palkit caption, .vaesto-taulu caption { padding: 0 0 .4rem; color: var(--ink-2); font-size: .82rem; font-weight: 700; text-align: left; }
.palkit th, .palkit td, .vaesto-taulu th, .vaesto-taulu td { padding: .3rem .5rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.palkit thead th, .vaesto-taulu thead th { color: var(--muted); font-size: .76rem; font-weight: 700; }
.palkit .luku, .vaesto-taulu .luku { text-align: right; }
.palkki-sarake { width: 45%; min-width: 7rem; }
.palkki-ala { position: relative; display: block; height: .7rem; }
.palkki { position: absolute; inset: 0 auto 0 0; width: calc(var(--osuus) * 100%); min-width: 2px; border-radius: 0 3px 3px 0; background: var(--data); }
.palkki-vertailu { position: absolute; top: -.15rem; bottom: -.15rem; left: calc(var(--osuus) * 100% - 1.5px); width: 3px; border-radius: 1px; background: var(--ink); }
.palkki-ala.pino { display: flex; gap: 2px; }
.pino-osa { display: inline-block; height: 100%; width: calc(var(--osuus) * 100%); }
.pino-osa:last-child { border-radius: 0 3px 3px 0; }
.pino-1 { background: var(--data-1); }
.pino-2 { background: var(--data-2); }
.pino-3 { background: var(--data-3); }
.kaavio-selite .pino-osa { width: 1.1rem; height: .6rem; border-radius: 2px; }
.vaesto-kunnat th[scope=row] a { font-weight: 700; }
.vaesto-kunnat tr:target { background: var(--yellow-soft); }
.vaesto-vuodet > summary { cursor: pointer; font-weight: 750; color: var(--red); }
.vaesto-maaritelmat dl { display: grid; grid-template-columns: minmax(9rem, max-content) minmax(0, 1fr); gap: .35rem 1rem; margin: 0 0 .8rem; font-size: .9rem; }
.vaesto-maaritelmat dt { font-weight: 750; }
.vaesto-maaritelmat dd { margin: 0; color: var(--ink-2); }
.vaesto-maaritelmat p { font-size: .88rem; color: var(--ink-2); }
.vaesto-muut { margin: 2.2rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .9rem; }
.vaesto-muut ul { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; margin: .4rem 0 0; padding: 0; }
.vaesto-lohko-sisa { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem 1.2rem; align-items: start; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); --data: #2a78d6; }
.vaesto-lohko-sisa .vaesto-vastaus { grid-column: 1; font-size: 1rem; }
.vaesto-kipina { grid-column: 2; grid-row: 1 / span 2; display: grid; justify-items: end; gap: .1rem; color: var(--muted); font-size: .72rem; }
.vaesto-rivit { grid-column: 1; list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; font-size: .92rem; }
.vaesto-lohko-sisa .vaesto-lahde { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .vaesto-luvut { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vaesto-luvut b { font-size: 1.4rem; }
  .kaavio text { font-size: 13px; }
  .palkki-sarake { width: 35%; min-width: 5rem; }
  .vaesto-maaritelmat dl { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .vaesto-maaritelmat dd { margin-bottom: .5rem; }
  .vaesto-lohko-sisa { grid-template-columns: minmax(0, 1fr); }
  .vaesto-kipina { grid-column: 1; grid-row: auto; justify-items: start; }
}

