
:root {
  --bg: #eef1f5; --card: #ffffff; --ink: #1b2733; --muted: #5c6b7a;
  --brand: #0b5394; --brand-dark: #0a3d6b; --brand-soft: #e8f0f9;
  --line: #dde4ec; --ok: #1e7e34; --ok-bg: #e6f4ea;
  --warn: #9a6a00; --warn-bg: #fff4d6; --bad: #b3261e; --bad-bg: #fdeceb;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55; }
.container { max-width: 960px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
header.site { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: .85rem 1.25rem; }
header.site .inner { max-width: 960px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: center; }
header.site .name { font-size: 1.15rem; font-weight: 700; letter-spacing: .2px; }
header.site .name a { color: #fff; text-decoration: none; }
header.site nav { display: flex; flex-wrap: wrap; gap: .3rem; }
header.site nav a { color: #d8e4f0; text-decoration: none; font-size: .9rem; padding: .3rem .7rem; border-radius: 999px; }
header.site nav a:hover { color: #fff; background: rgba(255,255,255,.14); }
header.site nav a.active { background: #fff; color: var(--brand-dark); font-weight: 600; }
nav.crumbs { font-size: .85rem; color: var(--muted); margin: .9rem 0 1.1rem; }
nav.crumbs a { color: var(--brand); text-decoration: none; }
nav.crumbs a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; margin: .2rem 0 .9rem; }
h2 { font-size: 1.22rem; margin: 0 0 .6rem; }
h1 .pn, .pn { font-weight: 700; color: var(--brand); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.15rem 1.4rem; margin: 0 0 1.1rem; box-shadow: 0 1px 2px rgba(16,35,60,.05); }
.card .sub { color: var(--muted); font-size: .95rem; margin: .2rem 0 .8rem; }
.card > h2:first-child { margin-top: 0; }
ul.columns { columns: 2; gap: 1.5rem; margin: .5rem 0; padding-left: 1.25rem; }
@media (max-width: 620px) { ul.columns { columns: 1; } }
table.data { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.data td, table.data th { border-bottom: 1px solid var(--line); padding: .55rem .7rem; text-align: left; }
table.data thead th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; border-bottom: 2px solid var(--line); }
table.data tbody tr:hover { background: #f7fafd; }
table { border-collapse: collapse; width: 100%; }
td, th { border-bottom: 1px solid var(--line); padding: .55rem .7rem; text-align: left; font-size: .93rem; }
thead th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; }
tr.halvin { background: var(--ok-bg); }
.price { font-size: 1.55rem; font-weight: 700; }
.muted { color: var(--muted); }
.histline { font-size: .83rem; color: var(--muted); margin: .7rem 0 0; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1.5; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.neutral { background: #eef1f5; color: var(--muted); }
.badge.halvin { background: #d9eee0; color: var(--ok); border: 1px solid #b7dcc6; }
.cta { display: inline-block; background: var(--brand); color: #fff; padding: .65rem 1.25rem; border-radius: 8px; text-decoration: none; font-weight: 600; }
.cta:hover { background: var(--brand-dark); color: #fff; }
.cta.small { padding: .3rem .75rem; font-size: .83rem; border-radius: 6px; }
a { color: var(--brand); }
details { margin: .5rem 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: .4rem 0 .8rem 1rem; }
.alt { background: var(--brand-soft); border: 1px solid #c9d9ec; padding: .8rem 1rem; border-radius: 8px; margin: .6rem 0; }
select, input[type=search], input[type=text] { font-size: 1rem; padding: .55rem .7rem; margin: .25rem .5rem .25rem 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
footer.site { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 2.5rem; }
/* --- etusivu: hero + tehtäväruudukko + sirut --- */
.hero { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); border-radius: 14px; color: #fff; padding: 1.9rem 1.5rem 1.7rem; margin: 0 0 1.1rem; }
.hero h1 { color: #fff; font-size: 2rem; margin: 0 0 .45rem; }
.hero p.sub { color: #d8e4f0; font-size: 1.02rem; max-width: 46rem; }
.hero form { display: flex; gap: .5rem; max-width: 34rem; margin: 1.05rem 0 .9rem; }
.hero input[type=search] { flex: 1; font-size: 1.02rem; padding: .72rem .95rem; border: none; border-radius: 8px; background: #fff; }
.hero button.cta { background: #fff; color: var(--brand-dark); font-weight: 700; }
.hero button.cta:hover { background: var(--brand-soft); }
.statrow { display: flex; flex-wrap: wrap; gap: .45rem; }
.statrow span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: .22rem .7rem; border-radius: 999px; font-size: .84rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.05rem 1.2rem; text-decoration: none; box-shadow: 0 1px 2px rgba(16,35,60,.05); }
.tile:hover { border-color: var(--brand); }
.tile .t { font-weight: 700; color: var(--brand-dark); display: block; margin-bottom: .25rem; }
.tile .d { color: var(--muted); font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.chips a { display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .28rem .85rem; text-decoration: none; font-size: .9rem; }
.chips a:hover { border-color: var(--brand); background: var(--brand-soft); }
/* --- yhtenäinen ilme kaikille sivuille (myös D1-served, tulee styles.css:stä) --- */
html { scroll-behavior: smooth; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.card > h2:first-child::before { content: ""; display: inline-block; width: .52rem; height: .52rem;
  background: var(--brand); border-radius: 1.5px; margin-right: .55rem; transform: rotate(45deg);
  box-shadow: 2px -2px 0 0 var(--brand-soft); }
table.data tbody tr:nth-child(even) { background: #fafcfe; }
h1 { letter-spacing: -.01em; }
/* --- etusivu: lehtimäiset komponentit --- */
.hero { position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 7 q10 -9 20 0 t20 0 t20 0 t20 0 t20 0 t20 0' fill='none' stroke='rgba(255,255,255,.22)' stroke-width='2.4'/%3E%3C/svg%3E") repeat-x;
  background-size: auto 100%; pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.kick { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 .2rem; }
.maggrid { display: grid; grid-template-columns: 1.45fr 1fr; gap: .8rem; margin-bottom: 1.1rem; }
@media (max-width: 720px) { .maggrid { grid-template-columns: 1fr; } }
.feat { display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px;
  background: linear-gradient(160deg, var(--brand-dark), var(--brand)); color: #fff;
  border-radius: 12px; padding: 1.1rem 1.25rem; text-decoration: none; position: relative; overflow: hidden; }
.feat:hover { box-shadow: 0 5px 16px rgba(11,83,148,.35); }
.feat .kick { color: #bcd6ee; }
.feat h3 { color: #fff; margin: .1rem 0 .35rem; font-size: 1.16rem; line-height: 1.32; }
.feat p { color: #d8e4f0; margin: 0; font-size: .92rem; }
.sidefeat { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem 1.15rem; box-shadow: 0 1px 2px rgba(16,35,60,.05); }
.sidefeat .head { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.sidefeat .head .mini { width: 22px; height: 22px; flex: none; }
.sidefeat .head .mini svg { width: 100%; height: 100%; }
.sidefeat .head .mini svg path, .sidefeat .head .mini svg circle, .sidefeat .head .mini svg rect,
.sidefeat .head .mini svg line, .sidefeat .head .mini svg polyline {
  fill: none; stroke: var(--brand); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.sidefeat a.item { display: block; padding: .5rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.sidefeat a.item:last-of-type { border-bottom: none; }
.sidefeat a.item b { color: var(--ink); font-weight: 600; font-size: .92rem; line-height: 1.35; display: block; }
.sidefeat a.item b:hover { color: var(--brand); }
.sidefeat a.item .mk { color: var(--brand); font-size: .68rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.seasons { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.1rem; }
@media (max-width: 720px) { .seasons { grid-template-columns: 1fr; } }
.season { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--sc, var(--brand));
  border-radius: 12px; padding: .95rem 1.15rem 1.05rem; box-shadow: 0 1px 2px rgba(16,35,60,.05); }
.season.summer { --sc: #1e9e6a; }
.season.winter { --sc: #2f6fb3; }
.season .kick { color: var(--sc); }
.season h3 { margin: .05rem 0 .45rem; font-size: 1.06rem; color: var(--brand-dark); }
.season ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .38rem; }
.season li a { display: inline-block; background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 999px; padding: .24rem .8rem; font-size: .87rem; text-decoration: none; }
.season li a:hover { background: var(--brand); color: #fff; }
/* --- feature-scenet ja "Viikon osa" --- */
.waveicon { position: absolute; right: -14px; bottom: -18px; width: 150px; height: 150px;
  opacity: .17; pointer-events: none; }
.waveicon svg { width: 100%; height: 100%; }
.waveicon path, .waveicon circle, .waveicon rect, .waveicon line, .waveicon polyline,
.waveicon ellipse {
  fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.season .waveicon { width: 92px; height: 92px; right: -8px; bottom: -12px; opacity: .13; }
.deal .dealrow { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin: .35rem 0 .5rem; }
.spark { width: 220px; height: 46px; flex: none; }
.spark polyline { fill: none; stroke: var(--ok); stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round; }
.spark circle { fill: var(--ok); }
.deal .old { text-decoration: line-through; color: var(--muted); font-size: 1.02rem; }
.deal .arrow { color: var(--muted); margin: 0 .35rem; }
/* --- osiosivujen yhteinen ilme --- */
.pagehead { margin: .1rem 0 1.15rem; }
.pagehead h1 { margin: .2rem 0 .45rem; font-size: 1.9rem; }
.pagehead .lede { color: var(--muted); max-width: 47rem; margin: 0; font-size: 1.02rem; }
.statblocks { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.15rem; }
.statblock { flex: 1; min-width: 150px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem 1.1rem; text-align: center;
  box-shadow: 0 1px 2px rgba(16,35,60,.05); }
.statblock b { display: block; font-size: 1.72rem; line-height: 1.15; color: var(--brand-dark); }
.statblock span { color: var(--muted); font-size: .88rem; }
.cattiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: .7rem; margin-bottom: 1.15rem; }
.cattile { display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem .7rem .85rem; text-decoration: none;
  box-shadow: 0 1px 2px rgba(16,35,60,.05); position: relative; overflow: hidden; }
.cattile:hover { border-color: var(--brand); }
.cattile .ic { width: 46px; height: 46px; margin-bottom: .5rem; opacity: .92; }
.cattile .ic svg { width: 100%; height: 100%; }
.cattile .ic path, .cattile .ic circle, .cattile .ic rect, .cattile .ic line,
.cattile .ic polyline { fill: none; stroke: var(--brand); stroke-width: 4.2;
  stroke-linecap: round; stroke-linejoin: round; }
.cattile b { color: var(--brand-dark); font-size: .88rem; line-height: 1.25; }
.cattile span { color: var(--muted); font-size: .79rem; margin-top: .12rem; }
.hubcover { display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 1.05rem 1.2rem; text-decoration: none;
  box-shadow: 0 1px 2px rgba(16,35,60,.05); position: relative; overflow: hidden;
  margin: 0 0 .8rem; }
.hubcover:hover { border-color: var(--brand); }
.hubcover h2 { margin: .05rem 0 .3rem; font-size: 1.08rem; }
.hubcover h2 a { color: var(--ink); text-decoration: none; }
.hubcover h2 a:hover { color: var(--brand); }
.hubcover p.d { color: var(--muted); font-size: .91rem; margin: 0 0 .55rem; max-width: 42rem; }
.hubcover .pills { display: flex; flex-wrap: wrap; gap: .32rem; }
.hubcover .pills span { background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 999px; padding: .16rem .68rem; font-size: .78rem; }
.wmark { position: absolute; right: -8px; top: -10px; width: 84px; height: 84px;
  opacity: .11; pointer-events: none; }
.wmark svg { width: 100%; height: 100%; }
.wmark path, .wmark circle, .wmark rect, .wmark line, .wmark polyline {
  fill: none; stroke: var(--brand); stroke-width: 4.2; stroke-linecap: round;
  stroke-linejoin: round; }
.shopcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: .8rem; margin-bottom: 1.1rem; }
.shopcard { display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 1.05rem 1.15rem;
  text-decoration: none; box-shadow: 0 1px 2px rgba(16,35,60,.05); }
.shopcard:hover { border-color: var(--brand); }
.shopcard b { color: var(--brand-dark); font-size: 1.04rem; }
.shopcard .n { color: var(--brand); font-weight: 700; margin-top: .3rem; }
.shopcard p { color: var(--muted); font-size: .88rem; margin: .3rem 0 0; }
.symgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: .7rem; margin: 0 0 1.1rem; }
.symcard { display: block; background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--brand); border-radius: 12px; padding: .85rem 1rem .95rem;
  text-decoration: none; }
.symcard:hover { border-color: var(--brand); }
.symcard .mk { font-size: .68rem; font-weight: 700; letter-spacing: .11em;
  text-transform: uppercase; color: var(--brand); }
.symcard b { display: block; color: var(--ink); font-size: .94rem; line-height: 1.35;
  margin-top: .18rem; }
.symcard:hover b { color: var(--brand); }
.symcard .d { color: var(--muted); font-size: .85rem; display: block; margin-top: .22rem; }
/* hakuehdotus (autocomplete) */
.sg-wrap { position: relative; display: block; }
.hero form .sg-wrap { flex: 1; display: flex; }
.sg-wrap > input { width: 100%; margin: 0; }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 26px rgba(16,35,60,.16); z-index: 60; overflow: hidden; }
.suggest button { display: flex; justify-content: space-between; align-items: center;
  gap: .6rem; width: 100%; text-align: left; background: none; border: none;
  border-bottom: 1px solid var(--line); padding: .55rem .85rem; font-size: .92rem;
  cursor: pointer; font-family: inherit; color: var(--ink); }
.suggest button:last-child { border-bottom: none; }
.suggest button:hover, .suggest button.on { background: var(--brand-soft); }
.suggest button b { font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.suggest button .m { flex: none; display: inline-block; background: #eef1f5;
  border-radius: 999px; padding: .07rem .6rem; font-size: .73rem; color: var(--muted); }
/* --- kategoria-ikonit (inline-SVG, viivastil) --- */
.caticon { float: right; width: 64px; height: 64px; margin: .1rem 0 .5rem 1rem; opacity: .9; }
.caticon svg { width: 100%; height: 100%; }
.caticon path, .caticon circle, .caticon rect, .caticon line, .caticon polyline {
  fill: none; stroke: var(--brand); stroke-width: 4.2;
  stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 620px) { .caticon { width: 48px; height: 48px; } }
