body.guide-working {
  margin:0;overflow:hidden;
  --guide-paper:#fff;--guide-ink:#20282a;--guide-muted:#4c575a;
  --guide-tint:var(--wl-soft,#edf4f1);--guide-accent:var(--accent,#36655b);
  --guide-line:color-mix(in srgb,var(--guide-accent) 52%,var(--guide-paper));
}
body.guide-working[data-guide-dark] {
  --guide-paper:#22282d;--guide-ink:#f2f4f5;--guide-muted:#c2cbd0;
  --guide-tint:var(--wl-dark-soft,#303c3b);
  --guide-line:color-mix(in srgb,var(--guide-accent) 50%,#b3c0c3);
}
.guide-working > :not(#guide):not(script):not(style):not(link),
#guide[data-lesson-open] > :not(#guide-step):not(#guide-work),
#guide-step [hidden],#guide-step .guide-result,#guide-step dt,#guide-step progress {display:none!important}
#guide[data-lesson-open] {
  position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;gap:0;
  width:100%;max-width:none;margin:0;padding:0;background:var(--guide-tint);
}
#guide[data-lesson-open] #guide-step {
  display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,auto);
  align-self:center;flex:0 0 auto;box-sizing:border-box;width:min(100%,64rem);max-height:48%;
  margin:0;padding:8px 14px;gap:6px 16px;overflow:hidden;color:var(--guide-ink);
  background:linear-gradient(110deg,var(--guide-tint),var(--guide-paper) 60%);
  border:1px solid var(--guide-line);border-top:3px solid var(--guide-accent);
  border-radius:0 0 14px 14px;box-shadow:0 3px 10px #13231a18;line-height:1.32;
}
#guide-step .guide-step-head {
  display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  grid-column:1/-1;align-items:center;gap:6px;margin:0;
}
#guide-step #guide-catalog {order:0;justify-self:start}
#guide-step #guide-progress {order:1;white-space:nowrap;font-size:.82rem;font-weight:650;color:var(--guide-muted)}
#guide-step #guide-collapse {order:2;justify-self:end}
#guide-step .guide-step-head button {min-width:min(100%,6rem)}
#guide-step .guide-copy {min-height:0;overflow:auto;overscroll-behavior:contain}
#guide-step #guide-lesson-name {margin:0;color:var(--guide-muted);font-size:.78rem;font-weight:650}
.guide-lesson .guide-lesson-text{grid-column:1/-1;min-width:0;border-top:1px solid var(--guide-line,#8885);padding-top:.6rem;overflow-wrap:anywhere}
.guide-lesson-text summary{cursor:pointer;min-height:44px;align-content:center}
.guide-lesson-text ol{margin:.35rem 0 0;padding-inline-start:1.35rem}
.guide-lesson-text li+li{margin-top:.6rem}
#guide-step #guide-step-title {margin:2px 0 4px;font-size:clamp(1rem,2vw,1.24rem);line-height:1.2;color:var(--guide-ink)}
#guide-step #guide-step-title:focus {outline:none}
#guide-step .guide-step-details {display:grid;gap:2px;margin:0}
#guide-step .guide-step-details dd {margin:0;color:var(--guide-ink)}
#guide-step .guide-step-details>div:nth-child(2) dd {color:var(--guide-muted)}
#guide-step #guide-check:not(:empty) {margin-top:4px;border-left:3px solid var(--guide-accent);padding:4px 8px;background:var(--guide-paper);font-size:.92em}
#guide-check button {margin:4px 5px 0 0}
#guide-step .guide-actions {
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  align-self:end;align-items:stretch;gap:6px;margin:0;width:17rem;
}
#guide-step .guide-actions:has(#guide-next[hidden]) {grid-template-columns:repeat(2,minmax(0,1fr))}
#guide-step button {
  display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;
  min-height:36px;padding:5px 9px;border:1px solid var(--guide-line);border-radius:9px;
  color:var(--guide-ink);background:var(--guide-paper);font-weight:650;line-height:1.18;text-align:center;
}
#guide-step #guide-done:not(:disabled),#guide-step #guide-next:not(:disabled) {
  background:var(--guide-accent);border-color:var(--guide-accent);color:var(--wl-accent-ink,white);
}
#guide-step button:disabled {opacity:1;color:var(--guide-muted);background:var(--guide-tint)}
#guide-step button:focus-visible {outline:2px solid var(--wl-link,var(--guide-accent));outline-offset:-3px}
#guide[data-lesson-open] #guide-step.guide-small {grid-template-rows:auto}
#guide-step.guide-small > :not(.guide-step-head) {display:none!important}
#guide-work:not([hidden]) {flex:1 1 0;display:block;min-height:0;width:100%;border:0;background:Canvas}
@media(max-width:699px) {
  #guide[data-lesson-open] #guide-step {
    grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,auto) auto;
    padding:5px 8px;gap:4px;max-height:46%;
  }
  #guide-step .guide-actions {width:100%}
  #guide-step .guide-step-details {font-size:.92rem}
  #guide-step .guide-step-head button {font-size:.84rem}
}
@media(pointer:coarse),(max-width:699px) {#guide-step button {min-height:44px}}
