:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #1b2321;
  --muted: #5d6967;
  --line: #e2e0d9;
  --brand: #0f3d3a;
  --brand-ink: #ffffff;
  --accent: #e8a33d;

  --ok: #1f8a5b;
  --ok-bg: #e6f4ec;
  --issues: #b86e00;
  --issues-bg: #fdf1dc;
  --major: #c2352b;
  --major-bg: #fbe5e2;
  --recovering: #2f6690;
  --recovering-bg: #e3eef6;
  --unknown: #77817f;
  --unknown-bg: #eceae4;

  --bar: #0f3d3a;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111615;
    --surface: #1a2120;
    --text: #e8ecea;
    --muted: #9aa6a3;
    --line: #2b3533;
    --brand: #0c2e2c;
    --ok: #4cc28a;
    --ok-bg: #16302a;
    --issues: #f0ad4e;
    --issues-bg: #33280f;
    --major: #ff6b5e;
    --major-bg: #3a1a17;
    --recovering: #7fb6e0;
    --recovering-bg: #182a38;
    --unknown: #8f9a97;
    --unknown-bg: #222927;
    --bar: #5fc4b5;
  }
}
@media (prefers-color-scheme: dark) { .search input { border: 1px solid rgb(255 255 255 / .16); } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: inherit; }
h1, h2 { line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Näppäimistökäyttö */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 8px 14px; background: var(--surface); color: var(--text); border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 8px; }
main:focus { outline: none; }

/* Header & footer */
.site-header { background: var(--brand); color: var(--brand-ink); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--brand-ink); }
.logo-mark { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent); position: relative; }
.logo-mark::after { content: ""; position: absolute; left: 50%; top: -6px; width: 3px; height: 11px; margin-left: -1.5px; background: var(--accent); border-radius: 2px; box-shadow: 0 0 0 2px var(--brand); }
.lang-switch { color: var(--brand-ink); font-size: .9rem; opacity: .85; }
.site-footer { margin-top: 48px; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.site-footer p { margin: .25rem 0; }

/* Hero: yläpalkin jatkona koko leveydeltä (box-shadow + clip-path, ei vaakavieritystä) */
.hero { position: relative; padding: 28px 0 30px; color: var(--brand-ink); background: var(--brand);
  box-shadow: 0 0 0 100vmax var(--brand); clip-path: inset(0 -100vmax); }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); margin: 0 0 .35rem; letter-spacing: -0.025em; }
.tagline { color: color-mix(in srgb, var(--brand-ink) 78%, transparent); margin: 0 0 1.25rem; max-width: 640px; }
.search { position: relative; display: block; max-width: 620px; }
.search::before { content: ""; position: absolute; left: 18px; top: 50%; width: 14px; height: 14px; margin-top: -10px;
  border: 2.5px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search::after { content: ""; position: absolute; left: 33px; top: 50%; width: 2.5px; height: 8px; margin-top: 2px;
  background: var(--muted); transform: rotate(-45deg); border-radius: 2px; pointer-events: none; }
.search input { width: 100%; font: inherit; font-size: 1.1rem; padding: 16px 18px 16px 50px; border-radius: 999px; border: 0;
  background: var(--surface); color: var(--text); box-shadow: 0 10px 30px rgb(0 0 0 / .22); }
.search input:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.hero .no-results { margin: .75rem 0 0; }
.busiest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 1.1rem 0 0; font-size: .875rem; }
.busiest-title { color: color-mix(in srgb, var(--brand-ink) 72%, transparent); margin-right: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; text-decoration: none; font-weight: 600;
  color: var(--brand-ink); background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .18); }
.chip:hover { background: rgb(255 255 255 / .2); }
.chip-n { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--accent); }

/* Häiriöitä nyt */
.now { margin-top: 20px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); }
.now h2 { margin-bottom: .5rem; }
.now p { margin: .25rem 0; }
.now-ok { border-left-color: var(--ok); }
.now-issues { border-left-color: var(--issues); }
.now-major { border-left-color: var(--major); }
.now-recovering { border-left-color: var(--recovering); }
.now-unknown { border-left-color: var(--unknown); }
/* Häiriöt nostokortteina */
.now-list { list-style: none; margin: .25rem 0 .5rem; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
/* Nostokortit ilman ympäröivää laatikkoa */
.now:has(.now-list) { background: none; border: 0; padding: 0; }
.spot { position: relative; display: flex; flex-direction: column; box-shadow: 0 4px 16px rgb(0 0 0 / .05); border-radius: 10px; border: 1px solid var(--line); border-top-width: 4px; overflow: hidden; background: var(--surface); }
.spot.level-major { border-top-color: var(--major); }
.spot.level-issues { border-top-color: var(--issues); }
.spot.level-recovering { border-top-color: var(--recovering); }
.spot-main { display: grid; align-content: start; gap: 2px; padding: 14px 16px 4px; text-decoration: none; flex: 1; }
.spot:has(.spark) .spot-name { padding-right: 96px; }
.spot-name { font-weight: 750; font-size: 1.25rem; letter-spacing: -0.01em; }
.spot-label { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.spot.level-major .spot-label { color: var(--major); }
.spot.level-issues .spot-label { color: var(--issues); }
.spot.level-recovering .spot-label { color: var(--recovering); }
.now-src, .now-count { font-size: .85rem; color: var(--muted); }
.spot .spark { position: absolute; top: 18px; right: 16px; width: 84px; height: 30px; margin: 0; pointer-events: none; }
.spot-cta { display: block; margin-top: 10px; padding: 11px 16px; font-weight: 650; font-size: .925rem; text-decoration: none; }
.spot.level-major .spot-cta { background: var(--major-bg); }
.spot.level-issues .spot-cta { background: var(--issues-bg); }
.spot.level-recovering .spot-cta { background: var(--recovering-bg); }
.spot-cta:hover { text-decoration: underline; }

/* Service cards */
.service-group { margin-top: 28px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
/* Rivin kortit yhtä korkeiksi, vaikka pitkä nimi rivittyy (esim. Chromebook (ChromeOS)) */
.card { display: grid; align-content: start; height: 100%; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); text-decoration: none; transition: transform .08s ease; }
.card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgb(0 0 0 / .07); }
.card-name { font-weight: 650; }
.card-name-note { font-weight: 500; font-size: .8em; color: var(--muted); }
.card-status { display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.card-count { color: var(--muted); font-size: .75rem; }
/* 24 h käyrä */
.spark { display: block; width: 100%; height: 16px; margin: 6px 0 3px; overflow: visible; }
.spark line { stroke: var(--line); stroke-width: 1; }
.spark rect { fill: color-mix(in srgb, var(--muted) 55%, transparent); }
.level-major .spark rect { fill: var(--major); }
.level-issues .spark rect { fill: var(--issues); }
.level-recovering .spark rect { fill: var(--recovering); }
.card.level-ok { border-left-color: var(--ok); }
.card.level-issues { border-left-color: var(--issues); background: var(--issues-bg); }
.card.level-major { border-left-color: var(--major); background: var(--major-bg); }
.card.level-recovering { border-left-color: var(--recovering); background: var(--recovering-bg); }
.card.level-unknown { border-left-color: var(--unknown); }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.level-ok .dot { background: var(--ok); }
.level-issues .dot { background: var(--issues); }
.level-major .dot { background: var(--major); animation: pulse 1.6s infinite; }
.level-recovering .dot { background: var(--recovering); }
.level-unknown .dot { background: transparent; border: 2px solid var(--unknown); }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .level-major .dot { animation: none; } }

/* Service page */
.crumbs { padding-top: 20px; font-size: .9rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.service h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: .5rem 0 1rem; }
.status-panel { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); border-left-width: 5px; }
.status-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.status-panel.level-ok { background: var(--ok-bg); border-left-color: var(--ok); }
.status-panel.level-issues { background: var(--issues-bg); border-left-color: var(--issues); }
.status-panel.level-major { background: var(--major-bg); border-left-color: var(--major); }
.status-panel.level-recovering { background: var(--recovering-bg); border-left-color: var(--recovering); }
.status-panel.level-unknown { background: var(--unknown-bg); border-left-color: var(--unknown); }
.status-label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.3rem; margin: 0; }
.status-label .dot { width: 14px; height: 14px; }
.status-answer { margin: .35rem 0 0; }
.status-count { text-align: right; color: var(--muted); font-size: .85rem; min-width: 120px; }
.status-count .big { display: block; font-size: 2.2rem; font-weight: 700; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }

.block { margin-top: 20px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.block p { margin: .25rem 0 .5rem; }
.report-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: .75rem 0; }
.report-btn { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--brand); background: transparent; color: var(--text); cursor: pointer; }
@media (prefers-color-scheme: dark) { .report-btn { border-color: var(--bar); } }
.report-btn:hover:not(:disabled) { background: var(--brand); color: var(--brand-ink); }
.report-btn:disabled { opacity: .5; cursor: default; }
.report-btn.chosen { background: var(--accent); border-color: var(--accent); color: #1b2321; opacity: 1; }
.report-msg { font-weight: 600; }
/* Etusivun "Ilmoita"-linkistä tultaessa lomake korostetaan */
.report { scroll-margin-top: 16px; }
.report:target { outline: 3px solid var(--accent); outline-offset: 2px; }

figure { margin: 0; }
.chart-wrap { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: 180px auto; column-gap: 8px; }
.chart { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .bar { fill: var(--bar); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 12px; color: var(--muted); margin: -8px 0; font-variant-numeric: tabular-nums; }
.chart-x { grid-column: 2; position: relative; height: 22px; font-size: 12px; color: var(--muted); }
.chart-x span { position: absolute; top: 4px; transform: translateX(-50%); white-space: nowrap; }
.chart-x span:first-child { transform: none; }
.chart-x span:last-child { transform: translateX(-100%); }
@media (max-width: 560px) { .chart-wrap { grid-template-rows: 150px auto; } .chart-x span:nth-child(even) { display: none; } }

.problem-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.problem-bars li { display: grid; grid-template-columns: 130px 1fr 48px; gap: 10px; align-items: center; font-size: .9rem; }
.pb-track { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.pb-fill { display: block; height: 100%; width: var(--w); background: var(--accent); }
.pb-pct { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Miksi tämä tila? */
.why { margin-top: 16px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent); }
.why-title { font-size: .95rem; margin: 0 0 .5rem; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.why-list li { display: grid; grid-template-columns: 130px 1fr; gap: 10px; font-size: .925rem; align-items: baseline; }
.why-src { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.why-src::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--unknown); }
.why-list .tone-ok .why-src::before { background: var(--ok); }
.why-list .tone-warn .why-src::before { background: var(--issues); }
.why-list .tone-bad .why-src::before { background: var(--major); }
.why-list .tone-neutral .why-src::before { background: var(--recovering); }
.why-list .tone-na .why-src::before { background: transparent; border: 1.5px solid var(--unknown); }
.why-list .tone-na .why-text { color: var(--muted); }
.why-text a { white-space: nowrap; }
.status-panel .updated { margin: 12px 0 0; }

.other-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.other-links a { color: var(--muted); }

.prose { max-width: 680px; padding-top: 24px; }
.prose h2 { margin-top: 1.5rem; }

@media (max-width: 560px) {
  .status-head { flex-direction: column; align-items: flex-start; }
  .status-count { text-align: left; }
  .why-list li { grid-template-columns: 1fr; gap: 0; }
  .problem-bars li { grid-template-columns: 100px 1fr 40px; }
}

/* Etusivu kapealla näytöllä: palvelut kahteen sarakkeeseen (koko sivu noin puolet lyhyempi) */
@media (max-width: 560px) {
  .hero { padding: 22px 0 24px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .card { padding: 10px 12px; }
  .card-status { font-size: .8rem; gap: 5px; align-items: flex-start; line-height: 1.3; }
  .card-status .dot { margin-top: 3px; width: 8px; height: 8px; }
  .card-count { font-size: .72rem; line-height: 1.3; }
  .spot-name { font-size: 1.15rem; }
}

/* Palvelusivun ilmoituspalkki (näkyy, kun lomake ei ole näkyvissä; JS hallitsee) */
.report-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  justify-content: space-between; max-width: 620px; margin: 0 auto; padding: 10px 10px 10px 18px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom)); background: var(--brand); color: var(--brand-ink);
  border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgb(0 0 0 / .18);
  transform: translateY(calc(100% + 40px)); transition: transform .25s ease; }
.report-dock[hidden] { display: none; }
.report-dock:not(.dock-on) { visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
.report-dock.dock-on { transform: none; }
@media (min-width: 640px) { .report-dock { bottom: 16px; border-radius: 999px; padding-bottom: 10px; } }
@media (prefers-reduced-motion: reduce) { .report-dock { transition: none; } }
.dock-q { margin: 0; font-weight: 650; line-height: 1.3; min-width: 0; }
.dock-btn { flex: none; padding: 11px 22px; border-radius: 999px; background: var(--accent); color: #1b2321;
  font-weight: 750; text-decoration: none; }
.dock-btn:hover { filter: brightness(1.06); }
body:has(.report-dock:not([hidden])) { padding-bottom: 96px; }
.report.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .report.flash { animation: none; outline: 3px solid var(--accent); } }

/* Vahvistuskortti ilmoituksen jälkeen */
.report.is-done { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: linear-gradient(180deg, var(--ok-bg), var(--surface) 70%); }
.report.is-done > h2 { display: none; }
.report-done { animation: done-in .35s ease; }
@keyframes done-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .report-done { animation: none; } }
.done-title { display: flex; align-items: center; gap: 12px; margin: 0 0 .6rem !important; font-size: 1.3rem; font-weight: 750; line-height: 1.25; }
.done-title:focus { outline: none; }
.done-check { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--ok); position: relative; }
.done-check::after { content: ""; position: absolute; left: 13px; top: 8px; width: 9px; height: 17px; border: solid #fff; border-width: 0 3.5px 3.5px 0; transform: rotate(45deg); }
.done-count { font-size: 1.05rem; font-weight: 600; }
.done-how { font-size: .925rem; }
.done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.share-btn { font: inherit; font-weight: 700; padding: 11px 22px; border-radius: 999px; border: 0; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
@media (prefers-color-scheme: dark) { .share-btn { background: var(--bar); color: #0c1513; } }
.share-btn:hover { filter: brightness(1.15); }
.done-link { font-weight: 600; }

/* ---------- Palvelusivun tila-hero ---------- */
.status-panel { position: relative; padding: 24px; border: 1px solid var(--line); border-top: 6px solid var(--lvl, var(--unknown)); border-radius: 18px; }
.status-panel.level-ok { --lvl: var(--ok); border-color: var(--line); border-top-color: var(--lvl); background: linear-gradient(160deg, var(--ok-bg) 0%, var(--surface) 85%); }
.status-panel.level-issues { --lvl: var(--issues); border-color: var(--line); border-top-color: var(--lvl); background: linear-gradient(160deg, var(--issues-bg) 0%, var(--surface) 85%); }
.status-panel.level-major { --lvl: var(--major); border-color: var(--line); border-top-color: var(--lvl); background: linear-gradient(160deg, var(--major-bg) 0%, var(--surface) 85%); }
.status-panel.level-recovering { --lvl: var(--recovering); border-color: var(--line); border-top-color: var(--lvl); background: linear-gradient(160deg, var(--recovering-bg) 0%, var(--surface) 85%); }
.status-panel.level-unknown { --lvl: var(--unknown); border-color: var(--line); border-top-color: var(--lvl); background: linear-gradient(160deg, var(--unknown-bg) 0%, var(--surface) 85%); }
.status-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.status-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--lvl); position: relative; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 2.2rem; line-height: 1; box-shadow: 0 0 0 8px color-mix(in srgb, var(--lvl) 18%, transparent); }
.level-issues .status-icon::before, .level-major .status-icon::before { content: "!"; }
.level-recovering .status-icon::before { content: "↓"; }
.level-unknown .status-icon::before { content: "?"; }
.level-ok .status-icon::before { content: ""; width: 14px; height: 26px; margin-top: -6px; border: solid #fff; border-width: 0 5px 5px 0; transform: rotate(45deg); }
.level-major .status-icon { animation: ring 2s infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--lvl) 6%, transparent); } }
.status-label { font-size: clamp(1.45rem, 4vw, 1.9rem); letter-spacing: -0.015em; }
.status-label .dot { display: none; }
.status-answer { font-size: 1.02rem; }
.status-count { min-width: 150px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 75%, transparent); border: 1px solid var(--line); }
.status-count .big { font-size: 2.4rem; }
.status-count .spark { height: 26px; margin: 8px 0 2px; }
.spark-caption { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
/* Perustelut signaalilaattoina */
.why { border-top: 0; padding-top: 6px; margin-top: 18px; }
.why-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.why-list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.why-list li { display: block; padding: 11px 13px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--unknown); font-size: .9rem; }
.why-list .tone-ok { border-top-color: var(--ok); }
.why-list .tone-warn { border-top-color: var(--issues); }
.why-list .tone-bad { border-top-color: var(--major); }
.why-list .tone-neutral { border-top-color: var(--recovering); }
.why-list .tone-na { border-top-style: dashed; }
.why-src { margin-bottom: 3px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.why-text { display: block; line-height: 1.45; }
.why-text a { white-space: normal; }
@media (prefers-reduced-motion: reduce) { .level-major .status-icon { animation: none; } }
@media (max-width: 560px) {
  .status-panel { padding: 20px 16px 16px; }
  .status-head { grid-template-columns: auto 1fr; gap: 12px 14px; }
  .status-icon { width: 48px; height: 48px; font-size: 1.7rem; box-shadow: 0 0 0 6px color-mix(in srgb, var(--lvl) 18%, transparent); align-self: start; }
  .level-ok .status-icon::before { width: 11px; height: 20px; border-width: 0 4px 4px 0; }
  .status-count { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; }
  .status-count .big { grid-row: 1 / 3; font-size: 2.1rem; }
  .status-count .spark { grid-column: 2; grid-row: 1; margin: 0; }
  .status-count > span:not(.big):not(.spark-caption) { grid-column: 2; grid-row: 2; }
  .spark-caption { display: none; }
  .why-list { grid-template-columns: 1fr; gap: 10px; }
  .why-list li { padding: 0 0 0 12px; background: none; border: 0; border-left: 3px solid var(--unknown); border-radius: 0; }
  .why-list .tone-ok { border-left-color: var(--ok); }
  .why-list .tone-warn { border-left-color: var(--issues); }
  .why-list .tone-bad { border-left-color: var(--major); }
  .why-list .tone-neutral { border-left-color: var(--recovering); }
  .why-list .tone-na { border-left-style: dashed; }
  .level-major .status-icon { animation: none; }
}

/* Palvelusivu: saman alan palvelut kortteina */
.peers .cards { margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.peers .card { box-shadow: none; }
@media (max-width: 560px) { .peers { padding: 18px 12px; } .peers h2, .peers > p { padding: 0 6px; } .peers .cards { grid-template-columns: 1fr 1fr; gap: 8px; } }

/* Etusivun pikahaku: osumat tiloineen hakukentän alla */
.search-results { max-width: 620px; margin-top: 10px; padding: 6px; background: var(--surface); color: var(--text);
  border-radius: 18px; box-shadow: 0 14px 40px rgb(0 0 0 / .28); }
.sr-item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 4px 10px; padding: 11px 12px;
  border-radius: 12px; text-decoration: none; }
.sr-item[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.sr-name { font-weight: 700; font-size: 1.05rem; }
.sr-status { font-size: .85rem; color: var(--muted); text-align: right; }
.sr-item.level-major .sr-status { color: var(--major); font-weight: 600; }
.sr-item.level-issues .sr-status { color: var(--issues); font-weight: 600; }
.sr-item.level-recovering .sr-status { color: var(--recovering); font-weight: 600; }
.sr-go { color: var(--muted); font-weight: 700; opacity: 0; transition: opacity .1s; }
.sr-item[aria-selected="true"] .sr-go { opacity: 1; }
/* Haun aikana häiriökooste ja pikalinkit väistyvät, jotta osumat ja suodatetut kortit ovat lähellä */
body.searching .busiest, body.searching .now, body.searching .nf-guess { display: none; }
.hero .no-results { color: var(--brand-ink); }
@media (max-width: 560px) { .sr-item { grid-template-columns: auto 1fr auto; } .sr-go { display: none; } }

/* 404 paluusivuna */
.nf-hero { padding-top: 22px; }
.nf-code { margin: 0; font-size: .85rem; font-weight: 800; letter-spacing: .3em; color: var(--accent); }
.nf-hero h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); }
.nf-guess { margin-top: 24px; }
.nf-cards .card { border-width: 1px 1px 1px 4px; box-shadow: 0 6px 20px rgb(0 0 0 / .06); }
.nf-cards .card-name { font-size: 1.15rem; }

/* Etusivun kategoriapalkki (tarttuu ruudun yläreunaan) */
.cat-bar { position: sticky; top: 0; z-index: 15; display: flex; gap: 8px; margin: 0 -16px; padding: 10px 16px;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: none; background: var(--bg); border-bottom: 1px solid var(--line); }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar[hidden] { display: none; }
.cat-chip { position: relative; flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 7px; font: inherit;
  font-size: .925rem; font-weight: 650; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; white-space: nowrap; }
.cat-chip:hover { border-color: var(--brand); }
.cat-chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
@media (prefers-color-scheme: dark) { .cat-chip[aria-pressed="true"] { background: var(--bar); border-color: var(--bar); color: #0c1513; } }
.cat-n { font-size: .75rem; font-weight: 600; opacity: .65; font-variant-numeric: tabular-nums; }
.cat-alert { width: 9px; height: 9px; border-radius: 50%; background: var(--major); box-shadow: 0 0 0 2px var(--surface); position: absolute; top: -2px; right: -2px; }
.cat-chip[aria-pressed="true"] .cat-alert { box-shadow: 0 0 0 2px var(--brand); }
@media (min-width: 900px) { .cat-bar { flex-wrap: wrap; margin: 0; padding-left: 0; padding-right: 0; } }
.service-group { scroll-margin-top: 64px; }
body.filtering .now, body.filtering .busiest { display: none; }

/* Tallennusvinkki vahvistuskortissa */
.done-save { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px dashed var(--line); }
.done-save p { margin: 0; }
.save-title { font-weight: 700; font-size: .95rem; }
.save-text { font-size: .9rem; margin-top: 2px !important; }
.save-btn { font: inherit; font-weight: 700; margin-top: 10px; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--brand); background: transparent; color: var(--text); cursor: pointer; }
.save-btn:hover { background: var(--brand); color: var(--brand-ink); }
@media (prefers-color-scheme: dark) { .save-btn { border-color: var(--bar); } .save-btn:hover { background: var(--bar); color: #0c1513; } }
