/* Community surfaces stay compact; navigation does not become a homepage banner. */
.sgm-community{max-width:1200px;margin:28px auto;padding:24px;color:#263b30;background:#fffefa;border-radius:16px;font:inherit;overflow-wrap:anywhere}
.sgm-community h1{font-size:clamp(25px,4vw,36px);line-height:1.2}.sgm-community h2{font-size:24px}.sgm-community p,.sgm-community li{line-height:1.6}
.sgm-community-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:16px}.sgm-community-grid article{padding:16px;background:#edf2eb;border-radius:12px}
.sgm-community .sgm-community-link,.sgm-community button,.sgm-community-dialog button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;margin:6px 8px 6px 0;background:#345a45;color:#fff;border:0;border-radius:8px;font:inherit;line-height:1.35;text-decoration:none;white-space:normal;cursor:pointer}
body .sgm-community-trigger{min-height:44px!important;padding:8px 12px!important;background:#edf2eb!important;color:#254533!important;border:0!important;border-radius:8px!important;font:inherit!important;font-size:14px!important;line-height:1.4!important;white-space:normal!important;cursor:pointer}
.sgm-community button:focus-visible,.sgm-community a:focus-visible,.sgm-community-trigger:focus-visible,.sgm-community-dialog :focus-visible{outline:3px solid #986511;outline-offset:3px}
html.sgm-community-open{overflow:hidden}
dialog.sgm-community-dialog{box-sizing:border-box;position:fixed;inset:0;margin:auto;max-width:calc(100vw - 24px);width:560px;height:min(760px,calc(var(--sgm-community-height,100dvh) - 32px));max-height:none;padding:0;border:0;border-radius:16px;background:#fffefa;color:#263b30;overflow:hidden}
dialog.sgm-community-dialog[open]{display:flex;flex-direction:column}dialog.sgm-community-dialog::backdrop{background:rgb(20 35 26 / .5)}
.sgm-community-dialog>header{display:flex;flex:none;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;background:#edf2eb}.sgm-community-dialog h2{margin:0;font-size:22px}.sgm-community-dialog>header button{flex:none;margin:0}
.sgm-community-dialog__body{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:18px 20px max(24px,env(safe-area-inset-bottom));line-height:1.55}
.sgm-community-dialog__body ul{list-style:none;margin:0;padding:0}.sgm-community-dialog__body li{padding:12px 0}.sgm-community-dialog__body small{display:block;color:#526353}.sgm-community-dialog__body a{display:block;color:#254533;padding:10px 0;min-height:24px;overflow-wrap:anywhere}.sgm-community-dialog__body h3{margin:24px 0 4px;font-size:19px}
@media(max-width:600px){dialog.sgm-community-dialog{top:var(--sgm-community-top,0px);bottom:auto;left:0;right:0;margin:0;width:100%;max-width:100%;height:var(--sgm-community-height,100dvh);border-radius:0}.sgm-community-dialog>header{padding-top:max(12px,env(safe-area-inset-top))}.sgm-community{margin:12px 0;padding:18px}.sgm-community-dialog__body{padding:12px 16px max(28px,env(safe-area-inset-bottom))}.sgm-community button,.sgm-community-link{box-sizing:border-box;max-width:100%}}

/* Equal account actions, including the dynamically inserted news button. */
body.sgm-ui .sgm-account__actions {
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:296px;gap:8px!important;align-items:stretch!important;max-width:100%;min-width:0;
}
body.sgm-ui .sgm-account__actions:has([data-sgm-knitting-open]) {grid-template-columns:repeat(4,minmax(0,1fr));width:600px;}
body.sgm-ui .sgm-account__actions > :is(a,button),
body.sgm-ui .sgm-mobile-menu__auth > :is(a,button) {
 box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;
 width:100%!important;min-width:0!important;max-width:none!important;height:48px!important;min-height:48px!important;
 margin:0!important;padding:8px 10px!important;border-radius:8px!important;
 font-family:inherit!important;font-size:13px!important;font-weight:700!important;line-height:16px!important;
 text-align:center!important;white-space:normal!important;text-decoration:none!important;gap:6px!important;
}
body.sgm-ui .sgm-mobile-menu__auth {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;}
@media(max-width:700px){body.sgm-ui .sgm-account__actions,body.sgm-ui .sgm-account__actions:has([data-sgm-knitting-open]){grid-template-columns:repeat(2,minmax(0,1fr));width:100%!important;}}

/* Compact desktop header; retain larger touch targets in the mobile menu. */
@media(min-width:701px){
 body.sgm-ui .sgm-account__actions {width:222px;gap:6px!important;}
 body.sgm-ui .sgm-account__actions:has([data-sgm-knitting-open]) {width:450px;}
 body.sgm-ui .sgm-account__actions > :is(a,button) {height:38px!important;min-height:38px!important;padding:5px 8px!important;font-size:12px!important;line-height:14px!important;border-radius:7px!important;}
}

/* Finished news panel: natural height, readable type and clear destinations. */
body dialog.sgm-community-dialog {
 height:fit-content!important;max-height:calc(var(--sgm-community-height,100dvh) - 32px)!important;
 font-family:var(--e-global-typography-text-font-family,Arial),sans-serif!important;font-size:16px!important;line-height:1.55!important;
 box-shadow:0 18px 65px rgb(20 35 26 / .18);
}
body .sgm-community-dialog > header {padding:16px 20px;}
body .sgm-community-dialog h2 {font:700 22px/1.25 var(--e-global-typography-text-font-family,Arial),sans-serif!important;color:#263b30!important;margin:0!important;}
body .sgm-community-dialog h3 {font:700 17px/1.35 var(--e-global-typography-text-font-family,Arial),sans-serif!important;color:#263b30!important;margin:0 0 8px!important;}
body .sgm-community-dialog p {font:400 16px/1.55 var(--e-global-typography-text-font-family,Arial),sans-serif!important;color:#526353!important;margin:0 0 14px!important;}
body .sgm-community-dialog button,body .sgm-community-dialog .sgm-community-action__link {
 box-sizing:border-box!important;min-height:44px!important;padding:10px 14px!important;margin:0!important;border:0!important;border-radius:8px!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 background:#345a45!important;color:#fff!important;font:600 14px/1.4 var(--e-global-typography-text-font-family,Arial),sans-serif!important;
 text-decoration:none!important;white-space:normal!important;cursor:pointer;
}
body .sgm-community-dialog button:hover,body .sgm-community-dialog .sgm-community-action__link:hover {background:#264733!important;}
body .sgm-community-dialog button:disabled {opacity:.6;cursor:wait;}
body .sgm-community-dialog > header button {min-width:64px;}
body .sgm-community-dialog__body {padding:20px;flex:0 1 auto;}
.sgm-community-empty {display:flex;align-items:flex-start;gap:12px;padding:16px;background:#edf2eb;border-radius:12px;margin:0 0 20px;}
.sgm-community-empty__icon {display:flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:#345a45;color:#fff;font:700 18px/1 Arial,sans-serif;}
body .sgm-community-empty p {margin:0!important;}
.sgm-community-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.sgm-community-action {display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:4px 0;}
body .sgm-community-action .sgm-community-action__link {margin-top:auto!important;}
body .sgm-community-dialog__body .sgm-community-news {display:grid;gap:8px;margin:0 0 16px;padding:0;}
body .sgm-community-dialog__body .sgm-community-news li {background:#f2f5ef;border-radius:10px;padding:12px 14px;}
body .sgm-community-dialog__body .sgm-community-news a {font:600 16px/1.45 var(--e-global-typography-text-font-family,Arial),sans-serif!important;min-height:44px;box-sizing:border-box;padding:8px 0;color:#254533!important;}
body .sgm-community-dialog__body small {font:400 13px/1.4 var(--e-global-typography-text-font-family,Arial),sans-serif!important;}
@media(max-width:600px){
 body dialog.sgm-community-dialog {max-height:var(--sgm-community-height,100dvh)!important;border-radius:0 0 16px 16px;}
 body .sgm-community-dialog > header {padding:12px 16px;padding-top:max(12px,env(safe-area-inset-top));}
 body .sgm-community-dialog__body {padding:16px 16px max(20px,env(safe-area-inset-bottom));}
 .sgm-community-actions {grid-template-columns:1fr;gap:20px;}
 body .sgm-community-action .sgm-community-action__link {width:100%;}
}
