:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #17191c;
  --muted: #646a72;
  --line: #e3e1da;
  --accent: #0f6b5c;
  --accent-ink: #ffffff;
  --accent-soft: #e2f0ec;
  --warn: #b5541c;
  --good: #2b7a3f;
  --bar-fi: #1d4fa3;
  --bar-uk: #b8323a;
  --bar-ee: #0072ce;
  --bar-cz: #11457e;
  --bar-nl: #e07b1a;
  --bar-no: #6b7280;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --grid: #ecebe6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315; --surface: #1a1d20; --ink: #eceae4; --muted: #9aa0a8; --line: #2b2f34;
    --accent: #4cc2a8; --accent-ink: #0b1a17; --accent-soft: #16302b; --warn: #f0965a; --good: #6bc884;
    --bar-fi: #6d9bf0; --bar-uk: #ee6d75; --bar-nl: #f2a65a; --bar-no: #9aa0a8; --bar-ee: #5aa9f0; --bar-cz: #8fb3e8;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --grid: #2a2e33;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap { display: flex; align-items: baseline; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.tag { color: var(--muted); font-size: 14px; }
h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; letter-spacing: -.02em; margin: 36px 0 8px; }
h2 { font-size: 18px; margin: 0 0 8px; }
.lead { color: var(--muted); max-width: 60ch; margin: 0 0 20px; }
.muted { color: var(--muted); } .small { font-size: 14px; }

.search { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: var(--surface); padding: 16px;
  border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); border: 0; padding: 0; margin: 0; min-width: 0; }
.field input, .field select { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; min-width: 0; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.colours { grid-column: 1 / -1; }
.colours legend { padding: 0; margin-bottom: 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 999px; padding: 5px 10px 5px 6px; font: inherit; font-size: 14px; cursor: pointer; }
.sw i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); display: inline-block; }
.sw[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.go { grid-column: 1 / -1; font: inherit; font-weight: 700; font-size: 17px; background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 10px; padding: 13px; cursor: pointer; }

.result { margin-top: 24px; display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.big { display: grid; grid-template-columns: auto 1fr; gap: 8px 28px; align-items: center; }
.big .ratio { font-size: clamp(44px, 9vw, 84px); font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.big .ratio small { font-size: .35em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.big .what { font-size: 20px; font-weight: 700; }
.badge.t0 { background: #eceef1; color: #5b6270; } .badge.t1 { background: #e3f4ee; color: #1e7a5e; } .badge.t2 { background: #e5efff; color: #2560c9; }
.badge.t3 { background: #efe8ff; color: #6b3fd6; } .badge.t4 { background: #fff3cf; color: #8a6200; } .badge.t5 { background: #e5484d; color: #fff; }
.ratio.only { color: #e5484d; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.crow { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.crow:first-child { border-top: 0; }
.cname { font-weight: 600; }
.cname small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; align-self: center; }
.bar > b { display: block; height: 100%; border-radius: 5px; }
.cnum { grid-column: 2; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cnum strong { color: var(--ink); }

#sharecanvas { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; margin: 8px 0 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 9px 14px; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); }

.checkgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
.stat { background: var(--bg); border-radius: 10px; padding: 14px; border: 1px solid var(--line); }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .s { font-size: 13px; color: var(--muted); }
.stat .good { color: var(--good); } .stat .bad { color: var(--warn); }
.kmfield { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); max-width: 280px; }
.kmfield input { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.verdict { min-height: 1.5em; font-weight: 600; }
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.partner { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--accent); border-radius: 12px; padding: 14px; background: var(--accent-soft); }
.partner strong { display: block; color: var(--accent); }
.partner span { font-size: 14px; color: var(--muted); }
.disclosure { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.ad { border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; padding: 28px; font-size: 13px; }
.about { margin: 24px 0; }
.sources { padding-left: 18px; margin: 0 0 8px; font-size: 14px; }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 32px; }
.hidden-note { color: var(--muted); font-style: italic; }

@media (max-width: 760px) {
  .search { grid-template-columns: 1fr; }
  .grid2, .partners, .checkgrid { grid-template-columns: 1fr; }
  .big { grid-template-columns: 1fr; }
  .crow { grid-template-columns: 1fr; }
  .cnum { grid-column: 1; }
}

/* ---- SEO-sivut (merkki / malli / vuosi) ---- */
.seo h1 { margin-top: 20px; }
.seo .lead { max-width: 72ch; color: var(--ink); }
.seo > section, .seo > .grid2, .seo > .checkgrid, .seo > .ad { margin-bottom: 16px; }
.crumbs { margin-top: 20px; font-size: 14px; color: var(--muted); }
.crumbs a, .links a, .yearnav a, .seo td a, .about a { color: var(--accent); }
.checkgrid.four { grid-template-columns: repeat(4, 1fr); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
th { font-size: 13px; color: var(--muted); font-weight: 600; border-top: 0; }
td.num, th.num { text-align: right; }
tbody tr:hover { background: var(--bg); }
.colrow { display: grid; grid-template-columns: 16px 92px 1fr 84px; gap: 10px; align-items: center; padding: 4px 0; font-size: 14px; }
.colrow .dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.colrow .cv { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.links { line-height: 2; }
.browse { margin-top: 24px; }
.yearnav { text-align: center; font-weight: 600; margin: 8px 0 24px; }
@media (max-width: 760px) {
  .checkgrid.four { grid-template-columns: 1fr 1fr; }
  .colrow { grid-template-columns: 16px 80px 1fr 70px; }
}
.pagelink { grid-column: 1 / -1; margin: 0; font-weight: 600; }
.pagelink a { color: var(--accent); }

/* ---- markkinat ---- */
.switch { margin-left: auto; display: flex; gap: 6px; }
.switch a { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.switch a[aria-current] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.checkgrid.two { grid-template-columns: repeat(3, 1fr); }
.chooser { margin: 24px 0 48px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.chooser .partner { padding: 20px; }
.chooser .partner strong { font-size: 20px; }
.chooser .suggested { box-shadow: 0 0 0 3px var(--accent); }
@media (max-width: 760px) { .checkgrid.two { grid-template-columns: 1fr 1fr; } }
.grid2.flat { gap: 24px; }
.grid2.flat h3 { font-size: 15px; margin: 4px 0 8px; }
ul.plain { list-style: none; padding: 0; margin: 0; line-height: 1.9; }
.good { color: var(--good); } .bad { color: var(--warn); }
td small.muted { font-size: 12px; }
.prose { max-width: 80ch; } .prose li { margin-bottom: 6px; }

/* --- evästesuostumus --- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 12px; pointer-events: none; }
.consent-in { pointer-events: auto; max-width: 720px; margin: 0 auto; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.consent .ch { font-size: 1.05rem; }
.consent p { margin: 6px 0 12px; font-size: .92rem; }
.consent .cbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.consent .cbtns .btn { flex: 1 1 160px; }
.consent .copts { display: grid; gap: 8px; margin: 0 0 12px; }
.consent .crow2 { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.consent .crow2 small { display: block; color: var(--muted); }
.foot a { color: inherit; }
mark { background: #ffe36e; color: #000; padding: 0 3px; border-radius: 3px; }
.platebox { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted, #666); margin-left: auto; }
.platebox select { font: inherit; font-weight: 700; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line, #ccc); background: transparent; color: inherit; }

/* ---- kaaviot (scripts/charts.py) ---- */
svg.chart { display: block; width: 100%; height: auto; margin: 8px 0 4px; overflow: visible; }
svg.chart .grid { stroke: var(--grid); stroke-width: 1; }
svg.chart .ax { fill: var(--muted); font-size: 12px; }
svg.chart .vl { fill: var(--ink); font-size: 13px; font-weight: 600; }
svg.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .ln.s1 { stroke: var(--s1); } svg.chart .ln.s2 { stroke: var(--s2); }
svg.chart .dot { stroke: var(--surface); stroke-width: 2; }
svg.chart .dot.s1, svg.chart .bar.s1 { fill: var(--s1); } svg.chart .dot.s2 { fill: var(--s2); }
svg.chart .hit { fill: transparent; }
svg.chart .pt:hover .dot { r: 6; } svg.chart .pt:hover .bar { opacity: .8; }
.lgd { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 6px 0 2px; }
.lgd span { display: inline-flex; align-items: center; gap: 6px; }
.lgd i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.lgd i.s1 { background: var(--s1); } .lgd i.s2 { background: var(--s2); }
.charts figure { margin: 0; min-width: 0; }
.charts figcaption { font-size: 14px; font-weight: 600; margin-top: 6px; }
.pairs { margin: 8px 0 4px; }
.prow { margin: 10px 0 12px; }
.pl { font-size: 14px; margin-bottom: 4px; } .pl small { color: var(--muted); }
.pb { display: flex; align-items: center; gap: 8px; height: 12px; margin: 2px 0; }
.pb b { display: block; height: 10px; border-radius: 0 4px 4px 0; min-width: 2px; }
.pb b.s1 { background: var(--s1); } .pb b.s2 { background: var(--s2); }
.pb span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.strip { display: flex; gap: 2px; height: 18px; margin: 4px 0 14px; }
.strip b { display: block; min-width: 2px; }
.strip b:first-child { border-radius: 4px 0 0 4px; } .strip b:last-child { border-radius: 0 4px 4px 0; }
details.tbl { margin-top: 10px; }
details.tbl summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 600; }
details.tbl[open] summary { margin-bottom: 8px; }
svg.chart.dense .dot { opacity: 0; } svg.chart.dense .pt:hover .dot, svg.chart.dense .pt:last-of-type .dot { opacity: 1; }
.strip b { box-shadow: inset 0 0 0 1px rgba(128,128,128,.28); }
svg.chart .hlb { fill: var(--accent-soft); }
.rbar { position: relative; height: 22px; margin: 18px 0 6px; background: var(--grid); border-radius: 4px; }
.rbar b { position: absolute; top: 4px; height: 14px; border-radius: 4px; }
.rbar b.s1 { background: var(--s1); }
.rbar i { position: absolute; top: -4px; width: 3px; height: 30px; margin-left: -1.5px; border-radius: 2px; }
.rbar i.rmed { background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.rbar i.rref { background: var(--s2); }
.rax { position: relative; height: 20px; font-size: 12px; color: var(--muted); }
.rax span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.rax span:first-child { transform: none; left: 0; } .rax span.r { right: 0; transform: none; }
.rax strong { color: var(--ink); }
[hidden] { display: none !important; }
.excards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.ex { display: grid; grid-template-columns: 14px 1fr; column-gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line);
      border-radius: 12px; color: var(--ink); text-decoration: none; background: var(--bg); transition: border-color .15s, transform .15s; }
.ex:hover { border-color: var(--accent); transform: translateY(-1px); }
.ex .dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128,128,128,.4); grid-row: span 2; }
.ex strong { font-size: 15px; line-height: 1.25; } .ex span:last-child { color: var(--muted); font-size: 13px; }
.toplist .colrow { grid-template-columns: minmax(0, 1.4fr) 1fr auto; }
.toplist .cn a { color: var(--ink); text-decoration: none; } .toplist .cn a:hover { color: var(--accent); }
.stack { display: grid; gap: 16px; margin: 16px 0; } .stack > .grid2 { margin: 0; }

svg.chart .ln.s3 { stroke: var(--s3); } svg.chart .ln.s4 { stroke: var(--s4); }
svg.chart .dot.s3 { fill: var(--s3); } svg.chart .dot.s4 { fill: var(--s4); }
.lgd i.s3 { background: var(--s3); } .lgd i.s4 { background: var(--s4); }
.dbars { margin: 8px 0; }
.drow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 3px 0; font-size: 14px; }
.dl small { color: var(--muted); }
.dtrack { position: relative; height: 22px; }
.dtrack::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--muted); opacity: .5; }
.dtrack b { position: absolute; top: 5px; height: 12px; }
.dtrack b.neg { right: 50%; border-radius: 4px 0 0 4px; } .dtrack b.pos { left: 50%; border-radius: 0 4px 4px 0; }
.dtrack b.s1 { background: var(--s1); } .dtrack b.s2 { background: var(--s2); }
.dtrack span { position: absolute; top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hbars .colrow.hb { grid-template-columns: minmax(0, 1.3fr) 1fr auto; }
.hbars .bar b.s1 { background: var(--s1); } .hbars .bar b.s2 { background: var(--s2); } .hbars .bar b.s4 { background: var(--s4); }
.hbars .cn .dot { display: inline-block; vertical-align: -2px; margin-right: 8px; }
.hbars .cn small { color: var(--muted); }
.scols { display: flex; gap: 10px; align-items: flex-end; margin: 12px 0 4px; }
.scol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.sstack { width: 100%; max-width: 64px; display: flex; flex-direction: column-reverse; gap: 2px; }
.sstack b { display: block; min-height: 1px; box-shadow: inset 0 0 0 1px rgba(128,128,128,.25); }
.sstack b:first-child { border-radius: 0 0 4px 4px; } .sstack b:last-child { border-radius: 4px 4px 0 0; }
.scol span { font-size: 12px; color: var(--muted); }
.article .meta { color: var(--muted); font-size: 14px; margin: -4px 0 18px; }
.article .prose p { max-width: 68ch; }
.article .key { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; margin: 14px 0; }
.artlist { display: grid; gap: 12px; }
.artlist a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.artlist a:hover { border-color: var(--accent); }
.artlist strong { font-size: 18px; display: block; margin-bottom: 4px; } .artlist span { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .drow { grid-template-columns: 1fr; gap: 2px; } }
.lgd i.sw { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128,128,128,.4); }
/* ---- artikkelit: lehtimäinen pohja ---- */
.article { max-width: 820px; margin: 0 auto; }
.article h1 { font-size: clamp(30px, 5.4vw, 48px); margin-bottom: 12px; }
.article .dek { font-size: 19px; line-height: 1.55; color: var(--ink); margin: 0 0 10px; max-width: 64ch; }
.article .meta { margin: 0 0 22px; }
.article h2.sh { font-size: 22px; margin: 34px 0 6px; letter-spacing: -.01em; }
.article .sp { color: var(--muted); margin: 0 0 12px; max-width: 64ch; }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 8px 0 8px; }
.hs { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.hs-l { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hs-v { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 4px 0 2px; }
.hs-s { font-size: 14px; color: var(--muted); }
.hs.good .hs-v { color: var(--s1); } .hs.bad .hs-v { color: var(--s2); }
.ranks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rank { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.rank h3 { margin: 0 0 8px; font-size: 15px; }
.rank ol { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.rank li:first-child { border-top: 0; }
.rk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.rank.good .rk { background: var(--s1); } .rank.bad .rk { background: var(--s2); }
.rn { font-weight: 600; line-height: 1.25; } .rn a { color: var(--ink); text-decoration: none; } .rn a:hover { color: var(--accent); }
.rn small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.rv { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv.good { color: var(--s1); } .rv.bad { color: var(--s2); }
.cmult { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cm { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 10px; box-shadow: var(--shadow); }
.cm-h { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.cm-h .sw { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128,128,128,.45); }
.cm-v { font-size: 15px; color: var(--muted); margin: 6px 0 8px; } .cm-v strong { font-size: 22px; color: var(--ink); }
.cm-v.up strong::after { content: " ▲"; font-size: 12px; color: var(--s1); } .cm-v.down strong::after { content: " ▼"; font-size: 12px; color: var(--s2); }
.cm-bars { display: flex; align-items: flex-end; gap: 4px; height: 64px; border-bottom: 1px solid var(--line); }
.cm-bars i { flex: 1; border-radius: 3px 3px 0 0; box-shadow: inset 0 0 0 1px rgba(128,128,128,.35); }
.cm-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.article details.method { margin-top: 28px; }
.article details.method summary { cursor: pointer; font-weight: 700; color: var(--accent); }
@media (max-width: 640px) { .ranks { grid-template-columns: 1fr; } .article .dek { font-size: 17px; } }
.ctl { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.ctl-i { flex: 1; min-width: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px;
         display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: var(--shadow); }
.ctl-d { font-size: 12px; color: var(--muted); font-weight: 600; }
.ctl-s { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128,128,128,.45); }
.ctl-n { font-weight: 700; font-size: 14px; }
.artlist.two { grid-template-columns: 1fr 1fr; } .artlist.two strong { font-size: 16px; margin: 0; }
.article a.btn { display: inline-block; text-decoration: none; }
@media (max-width: 640px) { .artlist.two { grid-template-columns: 1fr; } }
.hs-s b.good { color: var(--s1); font-size: 16px; } .hs-s b.bad { color: var(--s2); font-size: 16px; }
/* opas: ei isoja kirjaimia, luettava leipäteksti, lähderivit, harmaat vertailupalkit */
.hs-l { text-transform: none; letter-spacing: 0; font-size: 14px; }
.article .prose p, .article .sp { font-size: 18px; line-height: 1.65; max-width: 66ch; }
.article .src { font-size: 13px; color: var(--muted); margin: 12px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
.hbars .bar b.mute { background: var(--muted); opacity: .45; }
@media (max-width: 640px) { .article .prose p, .article .sp { font-size: 17px; } }
.hbars .cn a, .dl a { color: var(--ink); text-decoration: none; } .hbars .cn a:hover, .dl a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 640px) {
  .cards-sm table, .cards-sm tbody, .cards-sm tr, .cards-sm td { display: block; width: 100%; }
  .cards-sm thead { display: none; }
  .cards-sm tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 8px 0; background: var(--surface); }
  .cards-sm td { border: 0; padding: 3px 0; text-align: left !important; display: flex; justify-content: space-between; gap: 12px; }
  .cards-sm td::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
  .cards-sm td:first-child { font-weight: 700; } .cards-sm td:first-child::before { content: none; }
}
.dhead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; margin: 4px 0 6px; }
.dh2 { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.dh2 b { font-weight: 600; } .dh2 b:last-child { text-align: right; }
@media (max-width: 640px) { .dhead { grid-template-columns: 1fr; } .dhead > span:first-child { display: none; } }
.trust { font-size: 13px; color: var(--muted); margin: 10px 2px 0; max-width: 70ch; }

/* peli: kumpi on harvinaisempi? */
.game .gtop { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.game .gmsg { font-size: 20px; font-weight: 700; margin: 0; }
.game .gscore { color: var(--muted); margin: 0; }
.gpair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin: 18px 0 8px; }
.gvs { align-self: center; font-weight: 800; color: var(--muted); text-transform: lowercase; }
.gcard { display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 22px 20px; min-height: 170px; border-radius: 16px;
  border: 2px solid var(--line, #e3e1da); background: var(--surface, #fff); color: var(--ink); font: inherit; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.gcard:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.gcard:disabled { cursor: default; }
.gkind { font-size: 13px; font-weight: 700; color: var(--muted); }
.gname { font-size: 22px; font-weight: 800; line-height: 1.2; }
.gdot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); margin-right: 8px; vertical-align: -1px; }
.gnum { margin-top: auto; font-size: 15px; } .gnum strong { font-size: 26px; margin-right: 4px; } .gnum .badge { margin: 6px 0 0; }
.gnum a { font-size: 14px; }
.gcard.rarer { border-color: var(--s1); } .gcard.commoner { opacity: .75; }
.gcard.right { border-color: #1baf7a; box-shadow: 0 0 0 3px rgba(27,175,122,.2); }
.gcard.wrong { border-color: #e5484d; box-shadow: 0 0 0 3px rgba(229,72,77,.2); }
.gover { text-align: center; margin: 10px 0; } .gover p { font-size: 18px; }
.gctl { text-align: center; margin: 8px 0 0; }
.btn.ghost { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
@media (max-width: 640px) { .gpair { grid-template-columns: 1fr; } .gvs { text-align: center; } .gcard { min-height: 130px; } }
.playcta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.playcta strong { font-size: 18px; }
.gmodes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg, #f5f4f0); margin-bottom: 12px; }
.gmodes button { font: inherit; font-weight: 700; border: 0; border-radius: 9px; padding: 7px 14px; background: transparent; color: var(--muted); cursor: pointer; }
.gmodes button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.gcard.shown, .gcard.ask { cursor: default; }
.gcard.ask { border-color: var(--accent); }
.gbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; } .gbtns .btn { flex: 1 1 120px; font-size: 17px; padding: 12px; }
.gdone { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 24px 0; }
.gcard.shown:hover, .gcard.ask:hover { transform: none; box-shadow: none; }
.gcard.ask.right { border-color: #1baf7a; } .gcard.ask.wrong { border-color: #e5484d; }
/* automallin kuva otsikon vieressä (Wikimedia Commons) */
.mhead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); gap: 24px; align-items: start; }
.carimg { margin: 6px 0 0; }
.carimg img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; background: var(--line); }
.carimg figcaption { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.carimg figcaption a { color: var(--muted); }
@media (max-width: 760px) { .mhead { grid-template-columns: 1fr; gap: 6px; } .carimg { order: -1; } }
.resimg { float: right; width: 168px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin: 0 0 8px 14px; }
.big .resfig { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; margin: 4px 0 0; }
.big .resfig img { width: 132px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; flex: none; }
.big .resfig figcaption { font-size: 11.5px; color: var(--muted); } .big .resfig a { color: var(--muted); }
@media (max-width: 760px) { .carimg img { aspect-ratio: 16 / 9; } }
/* artikkelin pääkuva */
.arthero { margin: 18px 0 22px; }
.arthero img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; display: block; background: var(--line); }
.arthero figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; } .arthero figcaption a { color: var(--muted); }
/* etusivu: esimerkkitulos lomakkeen vieressä, kuvalliset nostot ja artikkelit */
.herogrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.heroex { display: block; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.06); margin-top: 8px; transition: transform .15s ease; }
.heroex:hover { transform: translateY(-2px); }
.heroex img, .heroex .noimg { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.hxb { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.hxk { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: none; }
.hxb .badge { align-self: flex-start; margin: 0; }
.hxbig { font-size: 38px; font-weight: 800; line-height: 1; color: #e5484d; } .hxbig small { font-size: 15px; color: var(--muted); font-weight: 600; }
.hxl { font-weight: 700; } .hxl .dot, .ex.ph .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; border: 1px solid rgba(0,0,0,.2); vertical-align: -1px; }
.hxt { font-size: 13px; color: var(--accent); font-weight: 600; }
.excards .ex.ph { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.ex.ph img, .ex.ph .noimg { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.ex.ph .exb { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.artcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.artc { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.artc img, .artc .noimg { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: var(--line); display: block; }
.artc strong { font-size: 15px; line-height: 1.3; } .artc:hover strong { color: var(--accent); }
@media (max-width: 860px) { .herogrid { grid-template-columns: 1fr; } .heroex { display: grid; grid-template-columns: 120px 1fr; }
  .heroex img, .heroex .noimg { aspect-ratio: auto; height: 100%; } .hxbig { font-size: 28px; } .artcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .excards { grid-template-columns: 1fr 1fr; } .ex.ph .exb strong { font-size: 14px; } .playcta .btn { text-decoration: none; } }
/* juuren maavalitsin */
.rootpage h1 { font-size: clamp(34px, 6vw, 56px); margin-top: 28px; }
.chooser .partner.cc { display: flex; flex-direction: column; gap: 6px; padding: 22px; }
.chooser .ccflag { font-size: 34px; line-height: 1; } .chooser .partner.cc strong { font-size: 22px; }
/* päivän harvinainen auto samalle tasolle lomakkeen kanssa: sama ylä- ja alareuna */
.herogrid { align-items: stretch; }
.herogrid .heromain { display: flex; flex-direction: column; }
.herogrid .heromain .search { flex: 1; margin-top: 0; margin-bottom: 0; }
.heroex { display: flex; flex-direction: column; margin-top: 0; }
.heroex img, .heroex .noimg { flex: 1 1 auto; min-height: 150px; aspect-ratio: auto; height: 0; }
@media (max-width: 860px) { .heroex { display: grid; } .heroex img, .heroex .noimg { height: 100%; min-height: 0; } }

/* ---- mobiili (suurin osa käyttäjistä): kompakti yläpalkki, lomake ja painike näkyviin, isot napautuskohteet ---- */
@media (max-width: 640px) {
  .top .wrap { flex-wrap: nowrap; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .tag { display: none; }
  .switch { gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .switch::-webkit-scrollbar { display: none; }
  .switch a { padding: 6px 8px; font-size: 16px; min-height: 36px; display: inline-flex; align-items: center; flex: none; }
  .switch a .cc { display: none; }
  .switch a[aria-current] .cc { display: inline; margin-left: 4px; font-size: 13px; }
  .hero h1 { font-size: 30px; line-height: 1.1; margin: 6px 0 8px; }
  .hero .lead { font-size: 16px; margin-bottom: 12px; }
  .search { grid-template-columns: 1fr 1fr; padding: 12px; gap: 10px; }
  .search > .field:first-child, .search > .colours, .search > .go { grid-column: 1 / -1; }
  .swatches { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 2px 12px 6px; scroll-snap-type: x proximity; }
  .swatches::-webkit-scrollbar { display: none; }
  .sw { flex: none; min-height: 40px; font-size: 15px; scroll-snap-align: start; }
  .platebox select { font-size: 16px; }
  details.tbl summary, .article details.method summary { padding: 10px 0; }
  .hbars .colrow.hb { min-height: 34px; }
  .consent { padding: 8px; }
  .consent-in { padding: 12px 14px; border-radius: 12px; }
  .consent .ch { font-size: 15px; }
  .consent p { font-size: 13px; margin: 2px 0 8px; line-height: 1.4; }
  .consent .cbtns { gap: 6px; }
  .consent .cbtns .btn { flex: 1 1 40%; padding: 10px 6px; font-size: 14px; min-height: 44px; }
  .consent .cbtns .btn.ghost { flex: 1 1 100%; min-height: 32px; padding: 4px; border: 0; background: none; text-decoration: underline; font-weight: 500; }
  /* peli: kortit rinnakkain ja napit heti näkyvissä */
  .gpair { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
  .gvs { display: none; }
  .gcard { padding: 12px; min-height: 0; gap: 6px; border-radius: 12px; }
  .gname { font-size: 16px; }
  .gnum { font-size: 13px; } .gnum strong { font-size: 20px; }
  .gbtns { flex-direction: column; gap: 6px; } .gbtns .btn { font-size: 15px; padding: 11px 6px; flex: none; }
  .game .gmsg { font-size: 17px; }
  .carimg img { aspect-ratio: 21 / 9; border-radius: 12px; }
  .carimg figcaption { font-size: 11px; margin-top: 4px; }
}

/* ---- holokortti: päivän harvinainen auto (keräilykortin folio kuvassa, sateenkaarireuna harvinaisimmille) ---- */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.heroex { position: relative; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease; will-change: transform; }
.heroex.tilt { transition: transform .06s linear; }
.hxart { position: relative; display: block; overflow: hidden; flex: 1 1 auto; min-height: 150px; height: 0; background: var(--line); }
.hxart img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heroex .hxart img { height: 100%; min-height: 0; aspect-ratio: auto; }
.hxart::before, .hxart::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
/* sateenkaarifolio: liikkuu hitaasti, hiiren kanssa seuraa osoitinta */
.hxart::before {
  background: linear-gradient(115deg, transparent 15%, rgba(255, 64, 180, .55) 28%, rgba(255, 214, 64, .55) 38%, rgba(64, 255, 176, .55) 48%,
              rgba(64, 176, 255, .55) 58%, rgba(176, 64, 255, .55) 68%, transparent 82%);
  background-size: 260% 260%; background-position: var(--px, 0%) var(--py, 50%);
  mix-blend-mode: hard-light; opacity: var(--holo, .28); animation: holo-drift 7s ease-in-out infinite alternate;
}
/* valon välähdys poikki kuvan */
.hxart::after {
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .75) 48%, rgba(255, 255, 255, .15) 54%, transparent 62%);
  background-size: 300% 100%; mix-blend-mode: overlay; animation: holo-sheen 4.5s ease-in-out infinite;
}
.heroex.tilt .hxart::before { animation: none; }
@keyframes holo-drift { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }
@keyframes holo-sheen { 0%, 55% { background-position: 120% 0; } 100% { background-position: -40% 0; } }
.heroex[data-t="3"] { --holo: .38; }
.heroex[data-t="4"] { --holo: .5; }
.heroex[data-t="5"] { --holo: .62; }
/* harvinaisimmat (legendaarinen, ainutlaatuinen): kiiltävä sateenkaarireuna */
.heroex[data-t="4"], .heroex[data-t="5"] {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              conic-gradient(from var(--ang), #ff4fd8, #ffd84f, #4fffb0, #4fb3ff, #b84fff, #ff4fd8) border-box;
  animation: holo-spin 6s linear infinite;
}
@keyframes holo-spin { to { --ang: 360deg; } }
.badge.t5 { background: linear-gradient(90deg, #e5484d, #ff4fd8, #b84fff, #e5484d); background-size: 200% 100%; animation: holo-badge 3s linear infinite; }
@keyframes holo-badge { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .heroex, .hxart::before, .hxart::after, .heroex[data-t="4"], .heroex[data-t="5"], .badge.t5 { animation: none !important; transition: none; transform: none; }
  .hxart::after { display: none; }
}
@media (max-width: 860px) { .hxart { height: 100%; min-height: 0; } }
