/* Learn sub-pages (guides.html, guide.html) in the v4 look. Loaded after v4.css (and ../guide.css on the guide page).
   Styles the markup that guides-hub.js and guide-render.js generate, so neither script needs changing. */
:root{--lv-info:#7fb2d9;--lv-easy:#7cc47a;--lv-adv:#e6a866;--lv-exp:#ff7a5c;--ok:#7cc47a;--flare:#ff6c4c;--r:18px;--acc-soft:rgba(240,166,94,.14)}
:root[data-look="light"]{--lv-info:#2f6f9e;--lv-easy:#2f7d2d;--lv-adv:#a3600f;--lv-exp:#c2412a;--ok:#2f7d2d;--acc-soft:rgba(196,111,34,.14)}

/* shared bits from the old nd.css: level meter, tool chips, authors */
.lvl{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:700;color:var(--c);white-space:nowrap}
.lvl .bars{display:inline-flex;align-items:flex-end;gap:2px;height:13px}
.lvl .bars i{width:3px;border-radius:1px;background:var(--edge2)}
.lvl .bars i:nth-child(1){height:5px}.lvl .bars i:nth-child(2){height:8px}.lvl .bars i:nth-child(3){height:11px}.lvl .bars i:nth-child(4){height:13px}
.lvl.easy{--c:var(--lv-easy)}.lvl.easy .bars i:nth-child(-n+1){background:var(--c)}
.lvl.advanced{--c:var(--lv-adv)}.lvl.advanced .bars i:nth-child(-n+3){background:var(--c)}
.lvl.expert{--c:var(--lv-exp)}.lvl.expert .bars i{background:var(--c)}
.lvl.info{--c:var(--lv-info)}.lvl.info .bars{display:none}
.lvl.info::before{content:"i";display:inline-grid;place-content:center;width:15px;height:15px;border-radius:50%;border:1.5px solid var(--c);font:800 10px/1 Georgia,serif}
.tech{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px 0 4px;border-radius:9px;border:1px solid var(--edge);background:var(--glass);font:600 12.5px var(--sans);color:var(--ink);white-space:nowrap;cursor:pointer;transition:border-color .2s}
.tech:hover,.tech[aria-pressed=true]{border-color:var(--acc)}
.tech b{display:inline-grid;place-content:center;width:20px;height:20px;border-radius:6px;background:var(--t,#7a7262);color:#14120f;font:800 10px/1 var(--sans)}
.avatar{display:inline-grid;place-content:center;width:var(--s,24px);height:var(--s,24px);border-radius:50%;background:var(--a);color:#14120f;font:800 calc(var(--s,24px)*.4)/1 var(--sans);flex:none}
.byline{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--muted)}
.byline b{color:var(--sub);font-weight:600}
.community-badge{font-size:11px;font-weight:700;color:var(--kitbag);border:1px solid var(--kitbag);border-radius:999px;padding:1px 8px}
.author-card{display:flex;gap:16px;align-items:flex-start;background:var(--glass2);border:1px solid var(--edge);border-radius:20px;padding:20px}
.author-card h3{font-size:18px;margin:0}.author-card p{margin:4px 0 8px;color:var(--sub);font-size:14.5px}
.author-card .links{display:flex;gap:14px;flex-wrap:wrap;font-size:14px;font-weight:600}.author-card .links a{text-decoration:none;color:var(--acc)}
.eyebrow{display:inline-flex;align-items:center;gap:8px;font:800 12px var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--acc)}
.muted{color:var(--muted)}
.linkbtn{border:0;background:none;color:var(--acc);font:700 14px var(--sans);cursor:pointer;padding:0}
.nolink{color:var(--sub)}

/* v4 demo-scene rules that share class names with guide markup: reset them on these pages */
[data-area] main .chip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 13px;border-radius:999px;border:1px solid var(--edge2);background:none;color:var(--ink);font:600 13px var(--sans);cursor:pointer;opacity:1;transform:none}
[data-area] main .chip[aria-pressed=true]{background:var(--acc);border-color:var(--acc);color:var(--acc-ink)}
[data-area] main .step{display:block;margin:0;background:none;border:0;border-radius:0;opacity:1;transform:none}
[data-area] main .fix{min-height:0;font-size:inherit;line-height:inherit}

/* ---------- the guides page (guides-v4.js) ---------- */
.hub-hero{padding-bottom:0}
.gsearch svg{flex:none;width:18px;height:18px;margin-left:14px;align-self:center;stroke:var(--muted);fill:none;stroke-width:2}
label.gsearch input{height:46px}
.ways{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:22px}
.ways a{display:inline-flex;align-items:center;gap:9px;height:40px;padding:0 16px 0 6px;border-radius:999px;border:1px solid var(--edge2);color:var(--head);font-weight:700;font-size:14.5px;text-decoration:none;transition:border-color .2s}
.ways a:hover{border-color:var(--acc)}
.ways b,.sh .stepno{display:inline-grid;place-content:center;width:28px;height:28px;border-radius:50%;background:var(--acc);color:var(--acc-ink);font:800 13px var(--sans)}
.sh .stepno{margin:0 auto 14px;color:var(--acc-ink);width:34px;height:34px;font-size:15px}
.hub-sec{padding-top:110px}
.hub-sec .sh{margin-bottom:30px}
.sh p b{color:var(--head)}
#continue{padding-top:60px}
.sh2 h2{font:400 30px/1.1 var(--serif);color:var(--head);margin:0 0 16px}
.conts{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.cont{display:flex;flex-direction:column;gap:4px;padding:20px 22px;border-radius:20px;text-decoration:none;border-color:var(--acc)}
.cont small{color:var(--muted);font-size:12.5px}.cont b{color:var(--head);font-size:17px}.cont span{margin-top:6px;color:var(--acc);font-weight:700}
.sub-h{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;font:700 13px var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin:40px 0 12px}
.sub-h span{letter-spacing:0;text-transform:none;font-weight:500;font-size:14px}
.pjs{display:grid;gap:10px}

/* a project: closed = one row, open = start button + numbered guides */
.pj{border-radius:22px;transition:border-color .3s}
.pj[open]{border-color:var(--edge2)}
.pj summary{list-style:none;display:grid;grid-template-columns:1fr auto 30px;gap:18px;align-items:center;padding:20px 22px;cursor:pointer}
.pj summary::-webkit-details-marker{display:none}
.pj-t b{display:block;font:400 25px/1.15 var(--serif);color:var(--head)}
.pj-t span{color:var(--sub);font-size:14.5px}
.pj-m{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;font-size:13px;color:var(--muted);text-align:right}
.pbar{display:inline-block;width:70px;height:6px;border-radius:3px;background:var(--glass2);overflow:hidden}
.pbar i{display:block;height:100%;width:var(--p);background:var(--ok)}
.pj-x{width:30px;height:30px;border-radius:50%;border:1px solid var(--edge2);position:relative}
.pj-x::before,.pj-x::after{content:"";position:absolute;left:50%;top:50%;width:11px;height:1.8px;margin:-1px 0 0 -5.5px;background:var(--acc);transition:transform .3s var(--ease)}
.pj-x::after{transform:rotate(90deg)}
.pj[open] .pj-x::after{transform:rotate(0)}
.pj-b{padding:0 22px 24px}
.pj-go{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:16px 0 18px;border-top:1px solid var(--edge)}
.pj-go .btn{height:48px;font-size:15px;white-space:normal;text-align:left;line-height:1.25}
.pj-go p{margin:0;flex:1;min-width:220px;font-size:14px;color:var(--muted)}
.alldone{font-weight:800;color:var(--ok)}
.ph-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:18px 0 8px}
.ph-h b{color:var(--head);font-size:15px}
.ph-h em{font-style:normal;font-size:11.5px;font-weight:700;color:var(--muted);border:1px dashed var(--edge2);border-radius:999px;padding:1px 8px}
.ph-h span{flex-basis:100%;font-size:13.5px;color:var(--muted)}
.gsteps{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.gsteps li{display:flex;align-items:center;gap:14px;padding:8px 12px 8px 8px;border-radius:14px}
.gsteps li.nx{background:var(--acc-soft)}
.gsteps .n{flex:none;display:grid;place-content:center;width:30px;height:30px;border-radius:50%;border:1.5px solid var(--edge2);font:800 13px var(--sans);color:var(--head)}
.gsteps li.done .n{background:var(--ok);border-color:var(--ok);color:#14120f}
.gsteps li.part .n{border-color:var(--acc)}
.gsteps .t{flex:1;min-width:0}
.gsteps a,.gsteps .nolink{color:var(--head);font-weight:600;text-decoration:none}
.gsteps a:hover{color:var(--acc)}
.gsteps .nolink{color:var(--muted)}
.gsteps small{display:block;font-size:12.5px;color:var(--muted)}
.you{flex:none;font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--acc)}
.flash{animation:flash 1.4s var(--ease)}
@keyframes flash{30%{box-shadow:0 0 0 3px var(--acc)}}

/* browse */
.filters{display:grid;gap:10px;justify-items:center;margin-bottom:22px}
.frow{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.listbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--edge);font-size:14px;color:var(--sub)}
.listbar b{color:var(--head)}
.soonbox{margin-left:auto;display:inline-flex;align-items:center;gap:8px;cursor:pointer;color:var(--sub)}
.soonbox input{width:17px;height:17px;accent-color:var(--acc)}
.glist2{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.gcard{position:relative;display:flex;flex-direction:column;gap:8px;padding:22px;border-radius:22px;border:1px solid var(--edge);background:var(--glass2);transition:border-color .3s,transform .5s var(--spring)}
.gcard:hover{border-color:var(--edge2);transform:translateY(-3px)}
.gcard.soon{border-style:dashed;background:var(--glass)}
.gcard .row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;font-size:12.5px;color:var(--muted)}
.gcard h3{margin:0;font:700 17.5px/1.3 var(--sans);color:var(--head)}
.gcard h3 a{color:var(--head);text-decoration:none}
.gcard h3 .stretch::after{content:"";position:absolute;inset:0;border-radius:inherit}
.gcard>p{margin:0;font-size:14.5px;color:var(--sub)}
.part-of{position:relative;z-index:1;margin-top:auto;padding-top:6px;font-size:13px;font-weight:700;color:var(--acc);text-decoration:none}
.part-of:hover{text-decoration:underline}
.tag{font-size:11px;font-weight:800;border-radius:999px;padding:1px 8px;color:var(--flare);border:1px dashed var(--flare)}
.tag.ok{color:var(--ok);border:1px solid var(--ok)}
.empty{grid-column:1/-1;padding:30px;text-align:center;color:var(--sub)}

/* ---------- one guide (guide-v4.js) ---------- */
.guidepage{padding-top:118px;max-width:1180px}
/* header: crumbs, title, one facts line, one button */
.guidehead{max-width:860px}
.guidepage .crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;padding:0;font-size:14px;color:var(--muted)}
.guidepage .crumbs a{color:var(--sub);text-decoration:none}.guidepage .crumbs a:hover{color:var(--head)}
.sertag{margin-left:6px;padding:4px 12px;border-radius:999px;border:1px solid var(--edge2);background:var(--glass);font-weight:700;font-size:13px}
.guidepage .sertag:hover{border-color:var(--acc)}
.guidehead h1{font:400 clamp(40px,5.4vw,66px)/1.04 var(--serif);letter-spacing:-.015em;color:var(--head);margin:18px 0 12px}
.guidepage .lede{max-width:720px;margin:0;font-size:19px}
.facts{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:20px;font-size:14px;color:var(--sub)}
.facts .verified{color:var(--ok);font-weight:700}
.labtag{display:inline-flex;align-items:center;gap:6px;font-weight:600;color:var(--acc)}
.labtag::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.gacts{margin-top:26px}
.gacts:empty{display:none}

/* Before you start: one card instead of six tiles */
.before{margin-top:44px;padding:30px;border-radius:26px;border:1px solid var(--edge);background:linear-gradient(160deg,var(--glass2),var(--glass) 60%)}
.before h2{font:400 30px/1.1 var(--serif);color:var(--head);margin:0 0 20px}
.bgrid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px 40px}
.bgrid>*{min-width:0}
.before small{display:block;margin:0 0 4px;font:800 11.5px var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.before p{margin:0 0 18px;color:var(--sub)}
.before b.big{display:block;font-size:19px;color:var(--head);margin-bottom:4px}
.kv2{display:flex;gap:12px;flex-wrap:wrap}
.kv2 div{flex:1;min-width:150px;padding:12px 14px;border-radius:14px;background:var(--glass2)}
.kv2 b{display:block;color:var(--head)}.kv2 span{font-size:13.5px;color:var(--sub)}
.before .need{margin:6px 0 18px;font-size:15px;color:var(--ink)}
.before .words{margin-top:8px;padding-top:16px;border-top:1px solid var(--edge)}
.before .words summary{color:var(--sub)}
.before .words .terms{margin-top:12px}
.before .tip{margin:14px 0 0;font-size:14.5px}
.before .tip b{color:var(--head)}
.before .expect{margin:-8px 0 16px}

/* layout: contents rail on the left, reading column on the right */
.guidepage .layout{margin-top:50px}
.guidepage .toc{top:96px}
.guidepage .toc ol{max-height:calc(100vh - 220px);overflow:auto}
.guidepage .toc a.on{background:var(--glass2);color:var(--head)}
.guidepage .progress{background:var(--glass2);border-color:var(--edge);border-radius:16px}
.guidepage .ring span{background:var(--bg)}
.ptxt{font-size:13px;color:var(--muted)}.ptxt b{display:block;color:var(--head);font-size:14px}
.guidepage article{font-size:17px;line-height:1.7}
.guidepage article h2{font:400 32px/1.15 var(--serif);color:var(--head);margin:56px 0 16px}
.guidepage article>h2:first-child,.guidepage article>.call:first-child+h2{margin-top:0}
.guidepage .gl,.guidepage .term,.guidepage .fix,.guidepage .next a,.guidepage .opt,.guidepage .clist fieldset,.guidepage .sph,.guidepage ul.secure li{background:var(--glass2);border-color:var(--edge);border-radius:16px}

/* steps: numbered timeline, one clear "done" tick per step */
.guidepage .step{padding-bottom:34px}
.guidepage .step h3{font:700 20px/1.35 var(--sans);color:var(--head);margin:4px 0 6px}
.guidepage .step .why{font-size:15.5px}
.guidepage .step .num{background:var(--bg)}
.guidepage .step.done .num{background:var(--ok);border-color:var(--ok)}
.guidepage .step.done>:not(.num):not(h3):not(.mark){opacity:.55;transition:opacity .3s}
.guidepage .code{background:#0b0a09;border-color:var(--edge2);border-radius:14px}
.guidepage .code button{font-weight:700;white-space:nowrap;flex-shrink:0}
.guidepage .mark{margin-top:10px;padding:8px 16px 8px 12px;border:1px solid var(--edge2);border-radius:999px;color:var(--head);transition:border-color .2s,background .2s}
.guidepage .mark:hover{border-color:var(--ok)}
.guidepage .step.done .mark{background:color-mix(in srgb,var(--ok) 14%,transparent);border-color:var(--ok)}

/* the end: next part first, then other ideas, did it work, a one-line author note */
.finish{margin-top:60px;padding-top:10px;border-top:1px solid var(--edge)}
.nextbig{display:flex;flex-direction:column;gap:6px;padding:26px 28px;border-radius:24px;border:1px solid var(--acc);background:var(--acc-soft);text-decoration:none;color:var(--sub);transition:transform .5s var(--spring)}
a.nextbig:hover{transform:translateY(-3px)}
.nextbig small{font:800 11.5px var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--acc)}
.nextbig b{font:400 28px/1.15 var(--serif);color:var(--head)}
.nextbig em{margin-top:6px;font-style:normal;font-weight:800;color:var(--acc)}
.nextbig.off,.nextbig.done{border-style:dashed;border-color:var(--edge2);background:var(--glass)}
.nextbig a{font-weight:700;color:var(--acc);text-decoration:none}
.also{margin:30px 0 12px;font:800 12px var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.guidepage .next a span{font-size:13.5px;color:var(--sub)}
.guidepage .helpful{margin-top:30px;background:none;border:1px dashed var(--edge2);border-radius:18px}
.guidepage .helpful b{color:var(--head)}.guidepage .helpful .muted{font-size:14px}
.author-line{display:flex;gap:14px;align-items:center;margin-top:26px;font-size:14px;color:var(--muted)}
.author-line a{color:var(--sub)}
.footnote{margin:50px 0 0;padding-top:20px;border-top:1px solid var(--edge);font-size:13.5px;color:var(--muted)}
.footnote a{color:var(--acc)}
:root[data-look="light"] .guidepage .code pre{color:#e8e2d4}

/* phones: the contents rail hides, so a slim progress bar sits at the bottom */
.mprog{display:none}
@media (max-width:980px){
  .mprog:not([hidden]){position:fixed;left:12px;right:12px;bottom:12px;z-index:40;display:flex;align-items:center;gap:12px;padding:10px 16px;border-radius:999px;font-size:13.5px;font-weight:700;color:var(--head)}
  .mbar{flex:1;height:6px;border-radius:3px;background:var(--glass2);overflow:hidden}
  .mbar i{display:block;height:100%;width:var(--p,0%);background:var(--ok);transition:width .4s var(--ease)}
  .bgrid{grid-template-columns:1fr}.before{padding:22px}
  .guidepage .footnote{margin-bottom:70px}
}
[data-area] main .step b{display:inline;width:auto;height:auto;border-radius:0;background:none;color:var(--head);font-size:inherit}
[data-area] main .term{background:var(--glass2);border-color:var(--edge)}
[data-area] main .note{margin:0;color:inherit;font-size:inherit}

@media (max-width:1000px){.glist2{grid-template-columns:1fr 1fr}.conts{grid-template-columns:1fr}}
@media (max-width:760px){
  .glist2{grid-template-columns:1fr}.hub-sec{padding-top:80px}.guidepage{padding-top:100px}
  .pj summary{grid-template-columns:1fr 30px;padding:18px}.pj-m{grid-column:1;grid-row:2;justify-content:flex-start;text-align:left}.pj-x{grid-row:1/3;grid-column:2}
  .pj-b{padding:0 14px 20px}.gsteps li{padding:8px 6px}.soonbox{margin-left:0}
}
html.still .flash{animation:none}
.guidepage .avatar{display:inline-grid;place-content:center;width:var(--s);height:var(--s);border:0;box-shadow:none;background:var(--a);color:#14120f;font:800 13px var(--sans)}
.guidepage .progress[hidden]{display:none}
@media (max-width:980px){.guidepage .toc{display:none}}

/* Guide evidence stays readable on narrow screens; originals open in a separate tab. */
.shots{display:block}.shots figure,.guide-clips figure{margin:24px 0;min-width:0}.shots img,.guide-clips video{display:block;width:100%;height:auto;max-height:none;object-fit:contain;border-radius:8px}.shots figcaption,.guide-clips p{font-size:16px;line-height:1.6}.shot-detail{display:block}.shots figcaption a,.guide-clips figure>a{display:inline-block;padding:8px 0}.guide-clips figcaption{margin-bottom:10px}

/* Bounded presentation revision: these two guide pages only. */
body[data-guide-flow] .step.done>:not(.num):not(h3):not(.mark){opacity:1}
body[data-guide-flow] .guide-watch{margin:12px 0 24px;border:1px solid var(--edge2);border-radius:10px;padding:12px 16px;background:var(--glass)}
body[data-guide-flow] .guide-watch summary{cursor:pointer;font-weight:700;color:var(--ink);line-height:1.6}
body[data-guide-flow] .guide-watch video{display:block;width:100%;height:auto;background:#171717;border-radius:7px}
body[data-guide-flow] .step h3{scroll-margin-top:100px}
body[data-guide-flow] .reading-preview{border:1px solid var(--edge2);border-radius:12px;padding:20px;margin:24px 0}
body[data-guide-flow] .sample-controls:not([hidden]){display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}
body[data-guide-flow] .sample-controls label{display:grid;gap:6px;font-weight:600}
body[data-guide-flow] .sample-controls select,body[data-guide-flow] #sample-reset{font:inherit;min-height:44px;padding:8px 12px;max-width:100%;color:var(--ink);background:var(--bg);border:1px solid var(--edge2);border-radius:7px}
body[data-guide-flow] .sample-text{padding:18px;background:#fff5e3;color:#30291f;font-size:16px;line-height:1.6;border-radius:8px;overflow-wrap:anywhere}
body[data-guide-flow] .sample-text[data-theme=dark]{background:#242424;color:#f4eee3}
body[data-guide-flow] .sample-text[data-theme=light]{background:#fff;color:#222}
body[data-guide-flow] .sample-text p{font:inherit;color:inherit}
body[data-guide-flow] .nd-cookie{max-width:430px;padding:14px 18px;gap:12px}
body[data-guide-flow] .nd-cookie .nd-cookie-art{display:none}
body[data-guide-flow] .nd-cookie h2{font-size:18px;margin:0 0 6px}
body[data-guide-flow] .nd-cookie p{font-size:14px;line-height:1.45;margin:6px 0}
body[data-guide-flow] .nd-cookie .acts{gap:10px;flex-wrap:wrap}
@media(max-width:600px){body[data-guide-flow] .nd-cookie{left:12px;right:12px;bottom:12px;width:auto;max-width:none;padding:12px 16px}body[data-guide-flow] .reading-preview{padding:14px}}

/* Avoid competing initial native/rendered fragment animations on the revised guides. */
html:has(body[data-guide-flow]){scroll-behavior:auto}
body[data-guide-flow] #article .step,body[data-guide-flow] #article h2[id]{scroll-margin-top:100px}
