/*
Theme Name: Värityskuva
Description: Värityskuva (fi) – yksinkertainen värityskirja: valkoinen paperi, suomensininen ja leikkausviivat.
Version: 2.0.0
Text Domain: varityskuva
*/

/* Värityskirja: plain white paper, Finnish blue ink, dashed cut-out lines. Simple and flat. */
:root{
  --ink:#0f2a5c;--text:#1d2433;--muted:#5d6676;--blue:#0a4fb4;--blue-d:#073c8a;--blue-t:#eaf1fb;--line:#c9d6ea;--paper:#fff;--soft:#f6f8fb;--red:#c8102e;
  --display:"Baloo 2",ui-rounded,system-ui,sans-serif;--body:"Figtree",ui-sans-serif,system-ui,sans-serif;
  --lacivert:var(--ink);--cini:var(--blue);--turkuaz:var(--blue);--safran:#f2a33a;--krem:var(--soft);--kum:var(--soft);
  --p1:var(--blue-t);--p2:var(--blue-t);--p3:var(--blue-t);--p5:var(--blue-t);--r:8px;--r-md:8px;--r-sm:6px;--r-lg:10px;--shadow:none;
  --sininen:var(--blue);--sininen-t:var(--blue-t);--lakka-t:var(--blue-t);--havu-t:var(--blue-t);--puolukka-d:var(--red);--paper-2:var(--soft);--accent:var(--blue)
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--text);font:400 17px/1.6 var(--body)}
img{max-width:100%;height:auto;display:block}
a{color:var(--blue);text-underline-offset:3px}
h1,h2,h3{font-family:var(--display);color:var(--ink);line-height:1.1;font-weight:700;margin:0}
:focus-visible{outline:3px solid #f2a33a;outline-offset:2px}
.wrap{width:min(1080px,100% - 32px);margin-inline:auto}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.icon{width:20px;height:20px;flex:none}
.skip-link{position:absolute;left:12px;top:-60px;z-index:50;background:var(--ink);color:#fff;padding:12px 18px;border-radius:6px}
.skip-link:focus{top:12px}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* header: flag stripe, brand + always-visible search, topic row */
.flagbar{height:6px;background:linear-gradient(90deg,var(--blue) 0 22%,#fff 22% 30%,var(--blue) 30% 100%)}
.site-head{border-bottom:2px dashed var(--line)}
.head-row{display:flex;align-items:center;gap:24px;padding:14px 0}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font:700 26px/1 var(--display);flex:none}
.brand img{width:52px;height:52px;border-radius:50%}
.brand small{font-size:15px;color:var(--muted);font-weight:500}
.head-search{flex:1;display:flex;max-width:460px;margin-left:auto;border:2px solid var(--ink);border-radius:999px;overflow:hidden;background:#fff}
.head-search input{flex:1;min-width:0;border:0;padding:0 16px;font:16px var(--body);min-height:46px;outline:none;color:var(--text)}
.head-search button{border:0;background:var(--ink);color:#fff;width:52px;display:grid;place-items:center;cursor:pointer}
.topics{background:var(--soft)}
.topics .wrap{display:flex;align-items:center;gap:10px;padding:8px 0}
.topics-lbl{font-weight:700;color:var(--ink);flex:none}
.topics ul{display:flex;gap:6px;list-style:none;margin:0;padding:0;overflow-x:auto;scrollbar-width:thin}
.topics a{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-radius:999px;white-space:nowrap;text-decoration:none;color:var(--text);font-weight:500}
.topics a:hover,.topics a[aria-current]{background:var(--blue);color:#fff}

/* buttons */
.btn,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 20px;border-radius:6px;border:2px solid var(--blue);background:var(--blue);color:#fff;font:600 16px var(--body);text-decoration:none;cursor:pointer;white-space:nowrap}
.btn:hover,.button:hover{background:var(--blue-d);border-color:var(--blue-d)}
.btn.alt{background:#fff;color:var(--blue)}
.btn.alt:hover{background:var(--blue-t)}
.btn.ghost,.button-outline{background:#fff;color:var(--ink);border-color:var(--line)}
.btn.ghost:hover,.button-outline:hover{border-color:var(--ink)}
.button[disabled]{opacity:.5;cursor:not-allowed}

/* home */
.home{padding:36px 0 60px}
.intro{max-width:760px;margin:0 auto 12px;text-align:center}
.intro h1{font-size:clamp(30px,4.4vw,48px)}
.intro p{color:var(--muted);font-size:18px;margin:12px 0 18px}
.steps{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 22px;list-style:none;margin:0;padding:0;font-weight:600;color:var(--ink)}
.steps b{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--blue);color:#fff;font-size:14px;margin-right:6px}
.sect{margin-top:48px}
.sect>h2,.textcol h2{font-size:clamp(24px,3vw,32px);margin-bottom:18px}
.sect>h2 a{color:inherit}
.two{display:grid;grid-template-columns:1fr 1.3fr;gap:40px;padding-top:36px;border-top:2px dashed var(--line)}
.two p{color:var(--muted)}

/* cut-out drawing cards */
.sheets{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:18px}
.cut{position:relative;display:flex;flex-direction:column;text-decoration:none;color:var(--text);border:2px dashed var(--line);border-radius:var(--r-lg);padding:10px;background:#fff;transition:border-color .15s}
.cut:hover{border-color:var(--blue);border-style:solid}
.cut-img{aspect-ratio:3/4;display:grid;place-items:center;overflow:hidden}
.cut-img img{width:100%;height:100%;object-fit:contain}
.cut-title{display:block;padding:10px 4px 2px;font-weight:600;font-size:15px;line-height:1.35}
.cut.fresh::before{content:"Uusi";position:absolute;top:-11px;left:12px;background:var(--red);color:#fff;font:700 12px var(--body);padding:2px 9px;border-radius:4px}

/* topic list */
.topic-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:4px 18px}
.topic-list a{display:flex;align-items:center;gap:12px;min-height:56px;padding:6px 8px;border-radius:6px;text-decoration:none;color:var(--text);border-bottom:1px solid var(--soft)}
.topic-list a:hover{background:var(--blue-t)}
.tl-img{width:44px;height:44px;border-radius:50%;overflow:hidden;border:2px solid var(--line);flex:none;background:#fff}
.tl-img img{width:100%;height:100%;object-fit:cover;object-position:top}
.tl-name{flex:1;font-weight:600}
.tl-count{font-size:13px;color:var(--muted);background:var(--soft);padding:2px 8px;border-radius:999px}

/* faq */
.faq details{border-bottom:1px solid var(--line)}
.faq summary{cursor:pointer;padding:14px 0;font-weight:600;color:var(--ink);min-height:44px}
.faq details p{margin:0 0 14px;color:var(--muted)}

/* listing & breadcrumbs */
.crumbs ol{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:18px 0 0;font-size:14px;color:var(--muted)}
.crumbs li+li::before{content:"›";margin:0 8px}
.crumbs a{color:var(--muted)}
.listing{padding-bottom:60px}
.list-head{padding:14px 0 24px;margin-bottom:24px;border-bottom:2px dashed var(--line)}
.list-head h1{font-size:clamp(30px,4.4vw,46px)}
.list-head .count{margin:6px 0 0;color:var(--muted)}
.list-head .lead{max-width:70ch;margin:12px 0}
.textcol{max-width:760px;margin-top:44px}
.textcol section+section{margin-top:32px}
.pager{display:flex;justify-content:center;gap:6px;margin-top:32px;flex-wrap:wrap}
.pager .page-numbers{min-width:44px;height:44px;display:grid;place-items:center;padding:0 10px;border:2px solid var(--line);border-radius:6px;text-decoration:none}
.pager .current{background:var(--ink);color:#fff;border-color:var(--ink)}
.empty{text-align:center;padding:60px 0}
.empty h1,.empty h2{font-size:clamp(26px,4vw,40px);margin:8px 0}
.empty p{color:var(--muted)}
.eyebrow{color:var(--red);font-weight:700}
.searchbox{display:flex;max-width:520px;border:2px solid var(--ink);border-radius:999px;overflow:hidden;margin:16px 0}
.searchbox input{flex:1;min-width:0;border:0;padding:0 16px;min-height:46px;font:16px var(--body);outline:none}
.searchbox button{border:0;background:var(--ink);color:#fff;padding:0 18px;font:600 16px var(--body);cursor:pointer}
.search-cats{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 24px}
.search-cats a{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-radius:999px;background:var(--blue-t);text-decoration:none;font-weight:600}

/* drawing page: one column */
.sheet-page{padding-bottom:60px}
.sheet-page>h1{font-size:clamp(26px,3.6vw,40px);text-align:center;margin:18px auto 20px;max-width:800px}
.frame{margin:0 auto;max-width:640px;border:2px dashed var(--line);border-radius:var(--r-lg);padding:18px;background:#fff}
.frame img{margin:auto;max-height:780px;width:auto}
.actionbar{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin:20px auto 8px}
.other-formats{text-align:center;color:var(--muted);font-size:15px;margin:0}
.sheet-page .textcol{margin:28px auto 0;text-align:center}
.lead{font-size:18px}
.small{font-size:14px;color:var(--muted)}
.author-credit{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:var(--muted)}
.author-credit .author-avatar img{width:28px;height:28px;border-radius:50%}

/* footer */
.site-foot{border-top:2px dashed var(--line);margin-top:20px;padding:28px 0 36px;text-align:center;background:var(--soft)}
.foot-brand{display:flex;justify-content:center;align-items:center;gap:10px;font:700 22px var(--display);color:var(--ink);margin:0 0 12px}
.foot-brand img{width:40px;height:40px;border-radius:50%}
.foot-brand small{font-size:14px;color:var(--muted)}
.foot-links{display:flex;flex-wrap:wrap;justify-content:center;gap:0 6px;list-style:none;margin:0;padding:0}
.foot-links a,.foot-links button{display:inline-flex;align-items:center;min-height:44px;padding:0 10px;color:var(--text);background:none;border:0;font:15px var(--body);cursor:pointer;text-decoration:underline}
.legal{font-size:13px;color:var(--muted);max-width:720px;margin:14px auto 0}

/* info pages, contact, author */
.info-page{padding:0 0 60px}
.info-page article{max-width:760px}
.info-page h1{font-size:clamp(30px,4.4vw,46px);margin:18px 0}
.page-content h2{font-size:26px;margin:34px 0 8px}
.page-content h3{font-size:19px;margin:20px 0 6px}
.page-content .page-lead{font-size:19px;border-left:4px solid var(--blue);padding:4px 0 4px 16px;margin:0 0 18px}
.info-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:14px 0}
.info-card{padding:16px;border:2px dashed var(--line);border-radius:var(--r-lg)}
.page-content .info-card h3{margin:0 0 4px}
.info-card p{margin:0}
.cats{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:14px;margin:12px 0}
.cat{text-decoration:none;text-align:center;color:var(--text)}
.cat-img{display:block;aspect-ratio:1;border-radius:50%;overflow:hidden;border:2px dashed var(--line)}
.cat-img img{width:100%;height:100%;object-fit:cover;object-position:top}
.cat b{display:block;margin-top:8px}
.contact-form{display:grid;gap:8px;max-width:620px;margin-top:18px}
.contact-form label{font-weight:600;margin-top:8px}
.contact-form label span{font-weight:400;color:var(--muted)}
.contact-form input,.contact-form select,.contact-form textarea{width:100%;min-height:48px;padding:12px 14px;border:2px solid var(--line);border-radius:6px;font:16px var(--body);background:#fff}
.contact-form textarea{resize:vertical}
.contact-form .contact-privacy{font-size:15px;color:var(--muted)}
.contact-form .button{justify-self:start}
.contact-honeypot{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.contact-notice{padding:14px 18px;border-left:4px solid var(--blue);background:var(--blue-t);margin:18px 0;font-weight:600}
.author-profile{display:grid;grid-template-columns:200px 1fr;gap:32px;align-items:start}
.author-profile img{width:200px;height:200px;border-radius:50%;object-fit:cover;border:3px dashed var(--line);padding:4px}
.author-profession{font-weight:700;color:var(--blue);margin:0 0 8px}
.author-socials{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.author-socials a{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border:2px solid var(--line);border-radius:999px;text-decoration:none;color:var(--text)}

/* download dialog & studio */
.download-dialog{border:0;border-radius:var(--r-lg);background:#fff}
.download-dialog::backdrop{background:rgba(15,42,92,.5)}
.download-title{font-family:var(--display)}
.format-choice:hover,.format-choice:focus-visible{background:var(--blue-t);border-color:var(--ink)}
.studio-main{padding-top:20px;padding-bottom:40px}
.studio-heading h1{font-size:clamp(26px,3.4vw,38px);margin:6px 0}
.studio-back{font-weight:600;text-decoration:none}
.studio-bravo{border:2px dashed var(--line);border-radius:var(--r-lg);padding:24px;margin-top:24px}
.studio-bravo h2{font-size:24px}

@media (max-width:760px){
  .head-row{flex-wrap:wrap;gap:12px}
  .head-search{max-width:none;flex-basis:100%}
  .two{grid-template-columns:1fr}
  .sheets{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .author-profile{grid-template-columns:1fr;justify-items:center;text-align:center}
  .author-profile img{width:150px;height:150px}
  .actionbar .btn{flex:1 1 100%}
}
@media print{.site-head,.flagbar,.site-foot,.crumbs,.actionbar,.other-formats,.textcol,.sect,.skip-link{display:none!important}.frame{border:0;padding:0}}

/* ---------- v2.1 polish: calm winter paper, no motion ---------- */
body{color:#1d2433;background:#fff}
.flagbar{height:8px}
.brand{font-size:28px}
.brand img{width:56px;height:56px;box-shadow:0 0 0 3px #fff,0 0 0 5px var(--blue-t)}
.site-head{border-bottom:0}
.topics{background:var(--blue-t);border-top:1px solid #dbe6f5;border-bottom:1px solid #dbe6f5}
.topics a{background:#fff;border:1px solid #d3e0f2;min-height:40px;font-size:15px}
.topics a:hover,.topics a[aria-current]{background:var(--ink);border-color:var(--ink)}
.home{padding-top:28px}
.intro{display:grid;grid-template-columns:1fr auto;align-items:center;gap:32px;max-width:none;text-align:left;margin:0;padding:34px 40px;border-radius:18px;
  background:radial-gradient(circle at 15% 30%,rgba(255,255,255,.9) 0 2px,transparent 3px) 0 0/38px 38px,radial-gradient(circle at 70% 75%,rgba(255,255,255,.75) 0 1.5px,transparent 2.5px) 0 0/27px 27px,linear-gradient(160deg,#e3eefc,#f3f7fd 70%)}
.intro h1{font-size:clamp(30px,4.2vw,46px);max-width:18ch}
.intro p{margin:12px 0 18px;max-width:56ch;color:#44506a}
.steps{justify-content:flex-start}
.steps li{background:#fff;border-radius:999px;padding:6px 14px 6px 6px;box-shadow:0 1px 2px rgba(15,42,92,.08)}
.intro-art{width:180px;height:180px;border-radius:50%;box-shadow:0 0 0 8px #fff,0 12px 28px -12px rgba(15,42,92,.35)}
.sect-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:18px}
.sect-head h2{margin:0}
.sect-head a{font-weight:600;white-space:nowrap}
.sect>h2,.sect-head h2,.textcol h2{display:flex;align-items:center;gap:10px}
.sect>h2::before,.sect-head h2::before,.textcol h2::before{content:"";width:22px;height:22px;flex:none;background:var(--blue);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 1h2v22h-2zM1 11h22v2H1zM3.5 4.9l1.4-1.4 15.6 15.6-1.4 1.4zM19.1 3.5l1.4 1.4L4.9 20.5l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 1h2v22h-2zM1 11h22v2H1zM3.5 4.9l1.4-1.4 15.6 15.6-1.4 1.4zM19.1 3.5l1.4 1.4L4.9 20.5l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat}
.cut{border:2px dashed #cfdcef;border-radius:14px;padding:12px}
.cut:hover{border-color:var(--blue);box-shadow:0 10px 24px -16px rgba(15,42,92,.45)}
.cut-img{background:#fbfcfe;border-radius:8px}
.cut-title{font-size:15.5px;color:var(--ink);padding:12px 2px 0}
.cut-cat{display:block;font-size:13px;color:var(--muted);padding:2px 2px 0}
.cut.fresh::before{top:-12px;border-radius:999px;padding:2px 10px}
.topic-list{gap:10px}
.topic-list a{border:1px solid #dbe6f5;border-radius:12px;min-height:64px;padding:8px 12px}
.topic-list a:hover{border-color:var(--blue);background:#fff}
.tl-img{width:46px;height:46px;border:0;box-shadow:0 0 0 2px var(--blue-t)}
.tl-count{background:var(--blue-t);color:var(--ink);font-weight:600}
.two{border-top:0;background:#f7f9fc;border-radius:18px;padding:30px 32px}
.faq details{border-bottom:1px solid #dde5f0}
.faq summary{list-style:none;position:relative;padding-right:30px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";position:absolute;right:4px;top:10px;font:700 22px var(--display);color:var(--blue)}
.faq details[open] summary::after{content:"–"}
.list-head{border-bottom:0;margin:14px 0 26px;padding:26px 30px;border-radius:18px;background:linear-gradient(160deg,#e3eefc,#f3f7fd 70%)}
.list-head .count{font-weight:600}
.desk{background:linear-gradient(160deg,#e3eefc,#f3f7fd 70%);border-radius:18px;padding:28px 16px}
.frame{border:0;box-shadow:0 1px 2px rgba(15,42,92,.08),0 18px 36px -22px rgba(15,42,92,.45);border-radius:6px}
.actionbar{margin-top:22px}
.actionbar .btn{min-height:52px;font-size:17px}
.facts{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 18px;list-style:none;padding:0;margin:14px 0;color:var(--muted);font-size:15px}
.facts li{display:flex;align-items:center;gap:6px}
.facts .icon{width:18px;height:18px;color:#1f8a5b}
.site-foot{background:var(--ink);color:#d5e0f2;border-top:0;margin-top:56px;padding-top:34px}
.site-foot .foot-brand{color:#fff}
.site-foot .foot-brand small{color:#9fb2d4}
.site-foot .foot-links a,.site-foot .foot-links button{color:#e6edf8}
.site-foot .foot-links a:hover,.site-foot .foot-links button:hover{color:#fff}
.site-foot .legal{color:#9fb2d4}
.site-foot{position:relative}
.site-foot::before{content:"";position:absolute;left:0;right:0;top:0;height:6px;background:linear-gradient(90deg,var(--blue) 0 22%,#fff 22% 30%,var(--blue) 30% 100%)}
.info-page h1,.list-head h1,.sheet-page>h1{letter-spacing:-.01em}
.page-content .page-lead{background:var(--blue-t);border-left:0;border-radius:12px;padding:16px 20px}
.info-card{border:0;background:#f4f7fc;border-radius:14px}
@media (max-width:760px){
  .intro{grid-template-columns:1fr;padding:24px 20px;text-align:left}
  .intro-art{display:none}
  .list-head{padding:20px}
  .two{padding:22px 18px}
  .desk{padding:16px 8px;border-radius:12px}
}
.listing .cut-cat,.sheet-page .cut-cat{display:none}

/* topic dropdown (replaces the topic row) */
.site-head{border-bottom:1px solid #dbe6f5}
.cat-menu{position:relative;flex:none}
.cat-menu summary{display:inline-flex;align-items:center;gap:8px;min-height:46px;padding:0 16px;border-radius:999px;background:var(--ink);color:#fff;font:600 16px var(--body);cursor:pointer;list-style:none;user-select:none}
.cat-menu summary::-webkit-details-marker{display:none}
.cat-menu summary:hover{background:var(--blue)}
.cat-menu[open] summary .caret{transform:rotate(180deg)}
.cat-panel{position:absolute;left:0;top:calc(100% + 10px);z-index:40;width:min(680px,calc(100vw - 32px));max-height:min(70vh,560px);overflow:auto;background:#fff;border:1px solid #dbe6f5;border-radius:16px;padding:18px 20px;box-shadow:0 24px 48px -20px rgba(15,42,92,.4);columns:2 240px;column-gap:28px}
.cat-group{break-inside:avoid;margin-bottom:14px}
.cat-group-title{margin:0 0 4px;font:700 13px var(--body);letter-spacing:.06em;text-transform:uppercase;color:var(--blue)}
.cat-group ul{list-style:none;margin:0;padding:0}
.cat-group a{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:40px;padding:0 10px;border-radius:8px;text-decoration:none;color:var(--text);font-weight:500}
.cat-group a span{font-size:12px;color:var(--muted);background:var(--soft);border-radius:999px;padding:1px 8px}
.cat-group a:hover,.cat-group a[aria-current]{background:var(--blue-t);color:var(--ink)}
.cat-all{column-span:all;margin:6px 0 0;padding-top:10px;border-top:1px solid #e6edf7}
.cat-all a{font-weight:600}
@media (max-width:760px){
  .head-row{flex-wrap:wrap}
  .cat-menu{order:2}
  .brand{order:1;flex:1}
  .head-search{order:3}
  .cat-menu summary span{display:none}
  .cat-menu summary{padding:0 14px}
  .cat-panel{position:fixed;left:16px;right:16px;top:auto;width:auto;margin-top:10px;columns:1}
}
