/* Roofz blog - same sketchbook look as the homepage: paper, dusty blue washes, ink borders, hand-written asides. Light-only by design (art is painted on white paper). */
:root{
  color-scheme:light;
  --paper:#fffdf8; --card:#ffffff; --ink:#1c2023; --muted:#50585d;
  --blue:#8fb3cc; --blue-deep:#4f7895; --blue-wash:#eaf1f6; --blue-mid:#d3e3ee;
  --yellow:#f2b705; --yellow-wash:#fdf4d8; --line:#e3ded2; --night:#1c2023; --on-night:#e4e7e8;
  --red:#b3261e;
  --display:"Archivo","Arial Black",system-ui,sans-serif;
  --sans:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --hand:"Caveat","Segoe Print","Comic Sans MS",cursive;
  --r:20px; --max:1180px;
  padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:18px;line-height:1.7;margin:0}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--paper)}
a{color:var(--blue-deep);text-underline-offset:3px}
a:hover{color:var(--ink)}
img{max-width:100%;height:auto;display:block}
:focus-visible{outline:3px solid var(--blue-deep);outline-offset:3px;border-radius:6px}
.wrap{max-width:var(--max);margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
h1,h2,h3,h4{font-family:var(--display);font-weight:800;line-height:1.1;letter-spacing:-.02em;text-wrap:balance;margin:0}
p{margin:0}
.hand{font-family:var(--hand);font-weight:700;line-height:1.15}
.label{display:inline-flex;align-self:flex-start;align-items:center;gap:8px;background:var(--card);border:2px solid var(--ink);border-radius:999px;padding:3px 13px;font-size:12.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink);text-decoration:none}
.ph{background:var(--yellow-wash);outline:1.5px dashed var(--muted);outline-offset:1px;padding:0 5px;border-radius:6px;font-weight:600;white-space:nowrap}

/* header */
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:9;background:var(--paper)}
.top .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-block:12px 8px}
.logo{display:block;text-decoration:none;color:var(--ink)}
.logo svg{display:block;width:128px;height:auto}
.nav{display:flex;align-items:center;gap:22px}
.nav a.link{text-decoration:none;font-weight:500;font-size:15px;color:var(--ink)}
.nav a.link:hover,.nav a.link[aria-current]{text-decoration:underline wavy var(--blue-deep);text-underline-offset:6px}
.pencil{display:block;width:100%;height:10px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:50px;padding:0 24px;border-radius:999px;background:var(--blue);color:var(--ink);font-family:var(--sans);font-weight:700;font-size:16px;text-decoration:none;border:2px solid var(--ink);cursor:pointer;box-shadow:0 4px 0 var(--ink);transition:transform .15s}
.btn:hover{transform:translateY(-2px) rotate(-1deg);color:var(--ink)}
.btn:active{transform:translateY(2px);box-shadow:0 2px 0 var(--ink)}
.btn.yellow{background:var(--yellow)}
.nav .btn{min-height:42px;padding:0 16px;font-size:15px}
@media (max-width:920px){.nav a.link{display:none}.nav a.link.keep{display:inline}}

/* post hero */
.crumbs{font-size:14px;color:var(--muted);display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.crumbs a{color:var(--muted)}
.post-hero{padding-block:30px 10px}
.post-hero .grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:44px;align-items:center}
.post-hero .txt{display:flex;flex-direction:column;gap:16px;min-width:0}
.post-hero h1{font-size:clamp(34px,4.6vw,56px);font-weight:900}
.post-hero .dek{font-size:20px;color:var(--muted);max-width:46ch}
.meta{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:14.5px;color:var(--muted)}
.meta span{display:inline-flex;align-items:center;gap:6px}
.polaroid{margin:0;background:#fff;padding:12px 12px 8px;border-radius:6px;box-shadow:0 12px 32px rgba(28,32,35,.12);transform:rotate(1.6deg);position:relative}
.polaroid::before{content:"";position:absolute;top:-14px;left:50%;width:120px;height:30px;margin-left:-60px;background:rgba(143,179,204,.55);transform:rotate(-3deg);border-radius:2px}
.polaroid img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:2px}
.polaroid figcaption{font-family:var(--hand);font-size:22px;line-height:1.2;color:#3d4347;text-align:center;padding:8px 6px 2px}
@media (max-width:860px){.post-hero .grid{grid-template-columns:1fr;gap:26px}}

/* layout: article + sticky survey */
.layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:56px;align-items:start;padding-block:30px 60px}
.side{position:sticky;top:96px;display:flex;flex-direction:column;gap:18px;min-width:0}
@media (max-width:1000px){.layout{grid-template-columns:1fr;gap:30px}.side{position:static;order:-1}}

/* survey form */
.survey{background:var(--card);border-radius:var(--r);padding:20px;display:grid;gap:12px;border:3px solid var(--ink);box-shadow:7px 7px 0 var(--blue);position:relative}
.survey h2{font-size:24px}
.survey p.sub{color:var(--muted);font-size:14.5px;line-height:1.5}
.field{display:flex;flex-direction:column;gap:5px;min-width:0}
label{font-size:13.5px;font-weight:600}
input,select,textarea{font:inherit;font-size:16px;color:var(--ink);background:var(--paper);border:2px solid var(--line);border-radius:12px;padding:10px 12px;min-height:46px;width:100%}
input:focus,select:focus,textarea:focus{border-color:var(--blue-deep);outline:none}
.err{color:var(--red);font-size:14.5px}
.done{border-radius:12px;padding:10px 12px;background:var(--blue-wash);font-weight:500;font-size:15px}
.survey .btn{width:100%}
.survey .small{font-size:14px;color:var(--muted)}

/* toc */
.toc{background:var(--blue-wash);border-radius:var(--r);padding:16px 18px}
.toc p{font-weight:700;font-size:13px;letter-spacing:.06em;text-transform:uppercase;margin-bottom:6px}
.toc ol{margin:0;padding-left:20px;font-size:15px;line-height:1.5;display:grid;gap:5px}
.toc a{color:var(--ink);text-decoration:none}
.toc a:hover{text-decoration:underline}
@media (max-width:1000px){.toc{display:none}}

/* article */
.prose{max-width:70ch;min-width:0}
.prose > * + *{margin-top:18px}
.prose h2{font-size:clamp(26px,3vw,34px);margin-top:48px;scroll-margin-top:90px}
.prose h3{font-size:22px;margin-top:30px}
.prose ul,.prose ol{padding-left:22px;display:grid;gap:8px}
.prose li::marker{color:var(--blue-deep)}
.prose strong{font-weight:700}
.prose .lede{font-size:21px;line-height:1.6}
.table-wrap{overflow-x:auto;border:2px solid var(--ink);border-radius:16px;background:var(--card)}
.table-wrap table{border-collapse:collapse;width:100%;min-width:520px;font-size:16px;font-variant-numeric:tabular-nums}
.table-wrap th{background:var(--blue-mid);text-align:left;font-weight:700;padding:11px 14px;border-bottom:2px solid var(--ink)}
.table-wrap td{padding:10px 14px;border-top:1px solid var(--line);vertical-align:top}
.table-wrap tr:nth-child(even) td{background:#fbfaf6}
.tip{background:var(--yellow-wash);border:2px solid var(--ink);border-radius:16px;padding:14px 18px;transform:rotate(-.4deg)}
.tip .tip-label{font-family:var(--hand);font-size:26px;font-weight:700;line-height:1.1;margin-bottom:4px}
.tip p + p{margin-top:8px}

/* cta box */
.cta-box{background:var(--night);color:var(--on-night);border-radius:var(--r);padding:24px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:center;box-shadow:7px 7px 0 var(--yellow)}
.cta-box h3{color:#fff;font-size:24px;margin:0}
.cta-box p{color:var(--on-night);margin-top:6px;font-size:16px}
@media (max-width:620px){.cta-box{grid-template-columns:1fr}}

/* infographic block in the article */
.ig-block{margin-top:40px}
.embed{margin-top:14px;border:2px dashed var(--muted);border-radius:16px;padding:14px 16px;background:var(--card)}
.embed h3{font-size:18px;margin:0 0 6px}
.embed p{font-size:15px;color:var(--muted)}
.embed textarea{margin-top:10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;min-height:96px;resize:vertical;background:var(--paper)}
.embed .row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:10px}
.embed .btn{min-height:42px;font-size:15px}
.embed .copied{font-size:14px;color:var(--blue-deep);font-weight:600}

/* infographic */
.ig{background:#fff;border:3px solid var(--ink);border-radius:22px;overflow:hidden;font-family:var(--sans);color:var(--ink)}
.ig-head{background:var(--blue-mid);padding:26px 26px 22px;border-bottom:3px solid var(--ink);display:flex;flex-direction:column;gap:6px}
.ig-kicker{font-family:var(--hand);font-size:26px;font-weight:700;line-height:1;color:var(--blue-deep)}
.ig-title{font-size:clamp(26px,3.4vw,36px);font-weight:900}
.ig-sub{font-size:16px;color:#3c4448;max-width:60ch}
.ig-sec{padding:22px 26px;border-top:2px dashed var(--line)}
.ig-sec:first-of-type{border-top:0}
.ig-h{font-size:19px;margin-bottom:14px;display:flex;align-items:center;gap:10px}
.ig-h::before{content:"";width:14px;height:14px;border-radius:50%;background:var(--yellow);border:2px solid var(--ink);flex:none}
.ig-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.ig-stat{background:var(--blue-wash);border-radius:14px;padding:14px;border:2px solid var(--ink)}
.ig-num{font-family:var(--display);font-weight:900;font-size:26px;line-height:1.1;letter-spacing:-.02em}
.ig-lab{font-size:14px;color:#3c4448;margin-top:4px;line-height:1.35}
.ig-bars{display:grid;gap:10px}
.ig-bar{position:relative;display:flex;justify-content:space-between;gap:10px;align-items:center;padding:8px 12px;border-radius:10px;font-size:15px;background:var(--paper);border:1.5px solid var(--line);isolation:isolate}
.ig-bar::before{content:"";position:absolute;inset:0 auto 0 0;width:var(--w,50%);background:var(--blue-mid);border-radius:8px;z-index:-1}
.ig-bar:nth-child(3n+2)::before{background:var(--yellow-wash)}
.ig-bar-lab{font-weight:600}
.ig-bar-val{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.ig-steps{list-style:none;margin:0;padding:0;display:grid;gap:10px;counter-reset:s}
.ig-steps li{counter-increment:s;position:relative;padding:6px 0 6px 50px;min-height:40px;font-size:15.5px;line-height:1.5}
.ig-steps li::before{content:counter(s);position:absolute;left:0;top:2px;font-family:var(--hand);font-weight:700;font-size:24px;width:36px;height:36px;border-radius:50%;border:2px dashed var(--ink);display:grid;place-items:center;line-height:1;background:#fff}
.ig-compare{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.ig-col{border:2px solid var(--ink);border-radius:14px;padding:14px;background:var(--card)}
.ig-col:first-child{background:var(--blue-wash)}
.ig-col h4{font-size:17px;margin-bottom:8px}
.ig-col ul{margin:0;padding-left:18px;font-size:14.5px;line-height:1.5;display:grid;gap:4px}
.ig-checks{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px 16px}
.ig-checks li{display:grid;grid-template-columns:22px minmax(0,1fr);gap:8px;font-size:15px;line-height:1.45}
.ig-checks li::before{content:"";width:18px;height:18px;margin-top:3px;border-radius:5px;border:2px solid var(--ink);background:var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='3,8.5 6.5,12 13,4' fill='none' stroke='%231c2023' stroke-width='2.4'/%3E%3C/svg%3E") center/12px no-repeat}
.ig-foot{background:var(--night);color:#c9cfd2;padding:14px 26px;font-size:13px;line-height:1.5;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}
.ig-foot a{color:#fff}
.ig-brand{font-family:var(--display);font-weight:900;color:#fff;letter-spacing:-.01em}

/* faq + sources */
.faq{display:grid;gap:10px}
.faq details{border-radius:16px;border:2px solid var(--ink);background:var(--card)}
.faq details[open]{background:var(--blue-wash)}
.faq summary{display:flex;align-items:center;gap:12px;cursor:pointer;padding:13px 18px;list-style:none;font-weight:600}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";margin-left:auto;font-size:24px;font-weight:300;line-height:1}
.faq details[open] summary::after{content:"\00D7"}
.faq summary h3{font:inherit;margin:0;letter-spacing:0}
.faq .a{padding:0 18px 14px}
.sources{font-size:14.5px;color:var(--muted)}
.sources ol{padding-left:20px;display:grid;gap:4px;margin:8px 0 0}
.sources a{word-break:break-word}

/* related + index cards */
.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.card{background:var(--card);border:2px solid var(--ink);border-radius:var(--r);overflow:hidden;display:flex;flex-direction:column;box-shadow:0 6px 0 var(--ink);text-decoration:none;color:var(--ink);transition:transform .2s}
.card:hover{transform:translateY(-4px);color:var(--ink)}
.card .art{aspect-ratio:4/3;background:#fff;border-bottom:2px dashed var(--line);overflow:hidden}
.card .art img{width:100%;height:100%;object-fit:cover}
.card .body{padding:16px 18px 18px;display:flex;flex-direction:column;gap:8px;flex:1}
.card h3{font-size:20px}
.card p{color:var(--muted);font-size:15.5px;line-height:1.5}
.card .tag{display:inline-block;align-self:flex-start;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;background:var(--yellow);border-radius:999px;padding:2px 10px}
.card .more{margin-top:auto;font-family:var(--hand);font-size:22px;color:var(--blue-deep)}
@media (max-width:940px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.cards{grid-template-columns:1fr}}
.band{padding-block:60px}
.band.blue{background:var(--blue-wash)}
.band h2.sec{font-size:clamp(28px,3.6vw,40px);margin-bottom:26px}

/* blog index */
.idx-hero{padding-block:34px 30px}
.idx-hero .grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:40px;align-items:center}
.idx-hero h1{font-size:clamp(40px,5.6vw,68px);font-weight:900}
.idx-hero .txt{display:flex;flex-direction:column;gap:16px;min-width:0}
.idx-hero p.dek{font-size:20px;color:var(--muted);max-width:44ch}
.filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:26px}
.filters button{font:inherit;font-size:14.5px;font-weight:600;background:var(--card);border:2px solid var(--ink);border-radius:999px;padding:6px 14px;cursor:pointer;min-height:40px;color:var(--ink)}
.filters button[aria-pressed="true"]{background:var(--ink);color:#fff}
@media (max-width:860px){.idx-hero .grid{grid-template-columns:1fr}}

/* roofline + footer */
.roofline{display:block;width:100%;height:auto;margin-bottom:-1px}
.roofline path{fill:var(--blue-wash)}
.roofline.to-night path{fill:var(--night)}
footer{background:var(--night);color:var(--on-night)}
footer .wrap{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:20px;padding-block:26px;font-size:14px}
footer .logo{color:#fff}
footer .logo svg{width:110px}
footer p{max-width:64ch;color:#b9c0c4}
footer a{color:#fff}
footer .ph{color:var(--ink)}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.btn,.card{transition:none}.btn:hover,.card:hover{transform:none}}
