/* ═══════════════════════════════════════════════════════════
   Rauhaly · Sisältösivujen tyylit · 2026-10-03
   Yhteinen tiedosto kaikille laskurit/-kansion sisältösivuille.
   Yksi muutos tänne näkyy kaikilla sivuilla kerralla.
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
:root {
  --bg:#fbfbfa; --surface:#ffffff; --surface-2:#f6f6f4;
  --border:#e8e8e4; --border-2:#d6d6d1;
  --text:#18181b; --text-2:#52525b; --text-3:#71717a; --text-4:#a1a1aa;
  --brand:#177bf3; --brand-2:#0d1b2a; --brand-soft:#eaf3fe; --brand-line:#b9d9fb; --navy:#0d1b2a;
  --warn:#a16207; --warn-soft:#fdf6e3;
  --sans:'Inter',system-ui,sans-serif; --mono:'JetBrains Mono',monospace;
  --r:8px; --r-lg:12px;
  --sh-2:0 1px 3px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.03);
  --ease:cubic-bezier(.22,1,.36,1);
}
body { font-family: var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.wrap { max-width: 780px; margin: 0 auto; padding: 0 22px; }

/* ── Yläpalkki ── */
.topbar { position: sticky; top: 0; background: rgba(251,251,250,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); z-index: 40; }
/* Sama leveys kuin tekstipalstalla, jotta logo on linjassa otsikon kanssa */
.topbar-inner { height: 58px; display: flex; align-items: center; gap: 10px; max-width: 780px; margin: 0 auto; padding: 0 22px; }
.brand-mark { width: 32px; height: 32px; background: #fff; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(13,27,42,.06); overflow: hidden; flex-shrink: 0; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.4px; text-decoration: none; color: var(--text); }
.brand-name span { color: var(--brand); }
.topbar-nav { margin-left: auto; display: flex; gap: 4px; }
.topbar-nav a { font-size: 13px; font-weight: 500; color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: var(--r); transition: all .12s; white-space: nowrap; }
.topbar-nav a:hover { background: var(--surface-2); color: var(--text); }
.topbar-nav a.cta { background: var(--text); color: #fff; }
.topbar-nav a.cta:hover { background: var(--brand-2); }

/* ── Murupolku ── */
.crumbs { padding: 20px 0 0; font-size: 12px; color: var(--text-4); }
.crumbs a { color: var(--text-3); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs span { margin: 0 6px; }

/* ── Otsikkoalue ── */
.doc-head { padding: 26px 0 28px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -1.1px; line-height: 1.14; }
.lead { margin-top: 15px; font-size: 16px; line-height: 1.68; color: var(--text-2); }

/* ── Leipäteksti ── */
section { margin-bottom: 36px; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -.5px; margin-bottom: 12px; line-height: 1.28; }
h3 { font-size: 15px; font-weight: 650; margin: 20px 0 8px; }
p { font-size: 15px; line-height: 1.75; color: var(--text-2); margin-bottom: 13px; }
ul, ol { margin: 0 0 13px 21px; }
li { font-size: 15px; line-height: 1.75; color: var(--text-2); margin-bottom: 6px; }
strong { color: var(--text); font-weight: 600; }
a { color: var(--brand); }
.num { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--text); }

/* ── Taulukko ── */
.tbl-wrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 700 10px var(--sans); text-transform: uppercase; letter-spacing: .9px; color: var(--text-3); padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); }
td { padding: 11px 12px; border: 1px solid var(--border); color: var(--text-2); line-height: 1.6; background: var(--surface); }
td.v { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }

/* ── Laatikot ── */
.note { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand-line); border-radius: var(--r); padding: 15px 17px; margin: 18px 0; }
.note p:last-child { margin-bottom: 0; }
.note p { font-size: 14px; }
.caution { background: var(--warn-soft); border: 1px solid #f0dca8; border-left: 3px solid #d9a441; border-radius: var(--r); padding: 15px 17px; margin: 18px 0; }
.caution p { font-size: 14px; color: #7a5209; margin-bottom: 0; }

/* ── Kehotus laskuriin ── */
.try { background: var(--brand-2); border-radius: var(--r-lg); padding: 28px 30px; margin: 34px 0; color: #fff; position: relative; overflow: hidden; }
.try::after { content: ''; position: absolute; width: 360px; height: 360px; right: -140px; top: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(23,123,243,.32), rgba(23,123,243,0) 68%); pointer-events: none; }
.try-inner { position: relative; }
.try h2 { color: #fff; font-size: 19px; margin-bottom: 8px; }
.try p { color: #9fb3c8; font-size: 14.5px; margin-bottom: 18px; max-width: 480px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 20px; border-radius: var(--r); font: 600 14px var(--sans); text-decoration: none; transition: all .18s var(--ease); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #0f6ad8; transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.btn-ghost:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }

/* ── Aiheeseen liittyvät ── */
.related { border-top: 1px solid var(--border); padding-top: 26px; margin-top: 10px; }
.related-title { font: 700 10px var(--sans); text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-3); margin-bottom: 14px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.related-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; text-decoration: none; display: block; transition: border-color .18s, background-color .18s; }
.related-card:hover { border-color: var(--brand-line); background: var(--surface-2); }
.related-card .rc-name { font-size: 14.5px; font-weight: 650; color: var(--text); margin-bottom: 3px; }
.related-card .rc-desc { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }

/* ── Alatunniste ── */
footer { border-top: 1px solid var(--border); margin-top: 34px; padding: 24px 0 44px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 780px; margin: 0 auto; padding: 0 22px; }
.footer-text { font-size: 12px; color: var(--text-4); line-height: 1.7; }
.footer-text a { color: var(--text-3); text-decoration: none; }
.footer-text a:hover { color: var(--brand); }

@media (max-width: 640px) {
  h1 { font-size: 27px; }
  h2 { font-size: 18px; }
  .related-grid { grid-template-columns: 1fr; }
  .try { padding: 24px 22px; }
  .topbar-nav a { padding: 8px 9px; font-size: 12.5px; }
  .topbar-nav a:not(.cta) { display: none; }
}
@media print {
  .topbar, .try, .related, footer { display: none !important; }
  body { background: #fff; }
}

/* ═══════════════════════════════════════════════════════════
   Oppaiden keskussivu
   Lista eika korttiruudukko: oppaat ovat tekstia, ja listassa
   otsikko paasee olemaan se mika erottaa ne toisistaan.
   ═══════════════════════════════════════════════════════════ */
.hub-group { margin-bottom: 40px; }
.hub-group:last-of-type { margin-bottom: 20px; }
.hub-label { font-size: 13px; font-weight: 650; color: var(--text); margin-bottom: 4px; }
.hub-hint { font-size: 13.5px; color: var(--text-3); line-height: 1.6; margin-bottom: 18px; }

.hub-list { border-top: 1px solid var(--border-2); }
.hub-item { display: block; text-decoration: none; padding: 20px 0; border-bottom: 1px solid var(--border);
  transition: padding-left .18s var(--ease); }
.hub-item:hover, .hub-item:focus-visible { padding-left: 8px; }
.hub-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 3px; }
.hub-title { font-size: 18px; font-weight: 650; color: var(--text); letter-spacing: -.4px; line-height: 1.3; margin-bottom: 6px; }
.hub-item:hover .hub-title { color: var(--brand); }
.hub-desc { font-size: 14px; color: var(--text-2); line-height: 1.6; max-width: 62ch; }
.hub-meta { margin-top: 9px; font-size: 12px; color: var(--text-4); }

@media (max-width: 640px) {
  .hub-title { font-size: 16.5px; }
  .hub-item { padding: 17px 0; }
}
