.sg-wrap{padding-block:clamp(30px,5vw,68px)}
.sg-heading{margin-bottom:22px}
.sg-heading h1{font-size:clamp(2rem,5vw,3.4rem);line-height:1.15;margin:0 0 .4em;letter-spacing:-.035em}
.sg-heading p,.sg-note,.sg-card p,.sg-kicker,[data-sg-count]{color:var(--muted)}
.sg-toolbar{display:grid;grid-template-columns:1fr minmax(160px,235px) auto;gap:10px 14px;align-items:center;padding:10px 0;margin-bottom:16px;border-block:1px solid var(--rule)}
.sg-toolbar[hidden],.sg-wrap [hidden]{display:none!important}
.sg-categories,.sg-views,.sg-step-buttons{display:flex;flex-wrap:wrap;gap:5px}
.sg-wrap button,.sg-toolbar input{min-height:38px;padding:6px 10px;border:1px solid var(--rule);border-radius:7px;background:var(--surface);color:var(--ink);font:inherit;font-size:.875rem}
.sg-wrap button{cursor:pointer}
.sg-wrap button:hover,.sg-wrap button[aria-pressed=true]{background:var(--surface-soft);border-color:var(--accent);color:var(--accent)}
.sg-toolbar input{width:100%;min-width:0}
[data-sg-count]{font-size:.875rem;white-space:nowrap}
.sg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px}
.sg-card{display:flex;flex-direction:column;max-width:420px;text-decoration:none;color:var(--ink);background:var(--surface);border:1px solid var(--rule);border-radius:10px;overflow:hidden}
.sg-card:hover{border-color:var(--accent);color:var(--ink)}
.sg-card img{width:100%;height:122px;object-fit:cover;background:var(--surface-soft)}
.sg-card-body{display:flex;flex:1;flex-direction:column;gap:4px;padding:12px}
.sg-card h2{margin:0;font-size:1.125rem;line-height:1.3}
.sg-card p{margin:0;font-size:.875rem;line-height:1.5}
.sg-badge{align-self:start;padding:0 7px;border-radius:4px;background:var(--surface-soft);color:var(--accent);font-size:.75rem;font-weight:650}
.sg-open{display:flex;justify-content:space-between;gap:6px;margin-top:auto;padding-top:7px;color:var(--accent);font-size:.875rem;font-weight:650}
.sg-card:hover .sg-open{text-decoration:underline}
.sg-dialog{width:min(880px,calc(100% - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:0;overscroll-behavior:contain;background:var(--surface);color:var(--ink);border:1px solid var(--rule);border-radius:14px}
.sg-dialog::backdrop{background:#10201990}
body:has(.sg-dialog[open]){overflow:hidden}
.sg-dialog-inner{padding:clamp(12px,3vw,22px)}
.sg-dialog-top,.sg-dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:8px 14px}
.sg-dialog-top h2,.sg-kicker{margin:0}
.sg-kicker,.sg-note{font-size:.875rem}
.sg-dialog-actions{flex-wrap:wrap;border-bottom:1px solid var(--rule);padding-block:9px;margin-bottom:12px}
.sg-close{min-width:40px}
.sg-wrap a:focus-visible,.sg-wrap button:focus-visible,.sg-wrap input:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.sg-wrap :is(.sg-back,.sg-next,.sg-note,.sg-dialog-actions) a{text-decoration:underline;text-underline-offset:3px}
.sg-step-buttons{margin:10px 0}
.sg-step{margin:8px 0}
.sg-step h3,.sg-step p{margin:3px 0}
.sg-step img,.sg-wrap video{width:100%;max-height:460px;object-fit:contain;background:var(--surface-soft);border-radius:8px}
.sg-dialog :is(.sg-step img,video){height:clamp(175px,42dvh,360px)}
.sg-detail{max-width:930px}
.sg-back{margin-bottom:14px}
.sg-detail-section{margin-block:24px}
.sg-next{display:flex;flex-wrap:wrap;gap:8px 20px;border-top:1px solid var(--rule);padding-top:18px}
@media(max-width:720px){.sg-toolbar{grid-template-columns:minmax(0,1fr) auto}.sg-categories{grid-column:1/-1}}
@media(max-width:540px){.sg-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sg-card img{height:clamp(68px,23vw,105px)}.sg-card h2{font-size:1rem}.sg-card-body{padding:9px}.sg-dialog :is(.sg-step img,video){height:auto;aspect-ratio:16/9}}
