/* Yhteinen ilme alasivuille (laskuri, Fiksuprompti). Ladataan sivun oman tyylin JÄLKEEN, joten tämä voittaa. */
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:300 700;font-display:swap;src:url(fontit/space-grotesk-latin.woff2) format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;src:url(fontit/inter-latin.woff2) format('woff2')}

/* Laskuri: vaalea */
html[data-page="laskuri"]{
  --bg:#F3F5F2;--surface:#FBFBF8;--fg:#17201C;--muted:#4E5B54;--line:#D3DCD6;
  --accent:#2F5A54;--accent-soft:#E2EEEB;--energy:#8E500A;
  --font-text:'Inter',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-num:'Space Grotesk',ui-sans-serif,system-ui,sans-serif;
}
/* Fiksuprompti: vaalea */
html[data-page="fiksuprompti"]{
  --bg:#F3F5F2;--surface:#FBFBF8;--fg:#17201C;--muted:#4E5B54;--line:#D3DCD6;
  --accent:#8E500A;--accent-soft:#F6E9D8;--ok:#2F5A54;--ok-soft:#E2EEEB;--paper:#FBFBF8;
  --font-text:'Inter',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-mono:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
}
/* Tumma tila */
@media (prefers-color-scheme:dark){
  html[data-page="laskuri"]:not([data-theme="light"]){
    --bg:#141B18;--surface:#1D2622;--fg:#E7ECE9;--muted:#A9B8B1;--line:#2B3632;
    --accent:#8CC2B7;--accent-soft:#1D2D2A;--energy:#E2A14C;
  }
  html[data-page="fiksuprompti"]:not([data-theme="light"]){
    --bg:#141B18;--surface:#1D2622;--fg:#E7ECE9;--muted:#A9B8B1;--line:#2B3632;
    --accent:#E2A14C;--accent-soft:#33261A;--ok:#8CC2B7;--ok-soft:#1D2D2A;--paper:#1D2622;
  }
}

body{margin:0}
h1,h2,h3{font-family:'Space Grotesk',ui-sans-serif,system-ui,sans-serif;letter-spacing:-.02em}
h1{font-weight:700}
h2{font-weight:600}

/* Ruutupaperi sivun taustalle */
html[data-page] body{
  background-color:var(--bg);
  background-image:linear-gradient(rgba(47,90,84,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(47,90,84,.07) 1px,transparent 1px);
  background-size:24px 24px;
}

/* Ylätunniste, sama kuin etusivulla */
.th-top{position:sticky;top:0;z-index:20;background:#2F5A54;color:#F3F5F2;font-family:'Inter',ui-sans-serif,system-ui,sans-serif}
.th-top .th-in{max-width:1120px;margin:0 auto;padding:0 max(16px,env(safe-area-inset-left,0px));display:flex;align-items:center;justify-content:space-between;height:64px;gap:16px}
.th-mark{font-family:'Space Grotesk',ui-sans-serif,system-ui,sans-serif;font-weight:700;font-size:20px;text-decoration:none;color:#F3F5F2;letter-spacing:-.01em;white-space:nowrap}
.th-mark span{color:#DDA45A}
.th-nav{display:flex;gap:24px;list-style:none;margin:0;padding:0;font-size:15px}
.th-nav a{text-decoration:none;color:#C4D6D0}
.th-nav a:hover,.th-nav a[aria-current="page"]{color:#F3F5F2}
.th-nav a[aria-current="page"]{border-bottom:2px solid #DDA45A;padding-bottom:3px}
@media (max-width:720px){.th-nav li.th-wide{display:none}.th-nav{gap:16px}}

/* Alatunniste, sama kuin etusivulla */
.th-foot{background:#17201C;color:#C4D6D0;font-family:'Inter',ui-sans-serif,system-ui,sans-serif;font-size:15px;line-height:1.6;margin-top:48px}
.th-foot .th-in{max-width:1120px;margin:0 auto;padding:40px max(16px,env(safe-area-inset-left,0px));display:flex;flex-wrap:wrap;gap:12px 32px;justify-content:space-between}
.th-foot a{color:#F3F5F2}
@media (prefers-color-scheme:dark){html:not([data-theme="light"]) .th-foot{background:#0C110F}}

html{scroll-padding-top:80px}
