:root{--sgfh-outline:#819c8e;--sgfh-divider:#91a99c}
.card,.post-card,.tool,.btn,.menu,.filters button,.topic-pill,.topics-panel,.archive-search input[type=search],.article-categories a,.archive-pagination .page-numbers,.header-search summary,.header-search input{border:3px solid var(--sgfh-outline)}
.card:hover,.post-card:hover,.btn:hover,.filters button:hover,.topic-pill:hover{border-color:var(--green)}.filters button.selected,.topic-pill.current,#topics .card.is-selected{border:3px solid var(--dark)}
.section,.footer,.fine,.top,.archive-topics,.archive-utility,.article-actions,.post-neighbours{border-top-width:3px;border-color:var(--sgfh-divider)}.top{border-top:0;border-bottom:3px solid var(--sgfh-divider)}.footer{border-top:3px solid var(--sgfh-divider)}.fine{border-top:3px solid var(--sgfh-divider)}#topics{border-top:0}.section{border-top:3px solid var(--sgfh-divider)}.article-actions,.post-neighbours,.sgfh-page .archive-topics{border-top:3px solid var(--sgfh-divider)}
h1,h2,.article-heading h1,.archive-intro h1{font-weight:700!important}.card h3,.tool h3,#topics .card h3{font-weight:700}.post-content h3{font-weight:400}
.topics-panel{max-height:min(70vh,640px);overflow-y:auto;width:275px}.nested-topics{list-style:none;margin:0 8px 8px 20px;padding:0 0 0 10px;border-left:2px solid #acc5b7}.nested-topics .nested-topics{margin-left:8px}.topics-panel .nested-topics a{font-size:14px;padding:6px 10px!important}.nested-topics li{list-style:none}
.nav{gap:20px}.menu{white-space:nowrap;flex-shrink:0}.top .nav>nav{margin-left:auto}.header-search{position:relative;flex-shrink:0;order:3}.header-search summary{list-style:none;display:grid;place-items:center;width:44px;height:44px;border-radius:9px;background:white;color:var(--ink);cursor:pointer}.header-search summary::-webkit-details-marker{display:none}.header-search summary svg{width:21px;height:21px}.header-search summary:focus-visible{outline:3px solid var(--green);outline-offset:3px}.header-search[open] summary{color:var(--green);border-color:var(--green)}.header-search form{position:absolute;right:0;top:calc(100% + 12px);z-index:50;width:min(440px,calc(100vw - 40px));display:flex;gap:9px;align-items:center;padding:15px;border:3px solid var(--sgfh-outline);border-radius:12px;background:var(--bg);box-shadow:0 12px 30px #0b19301a}.header-search input{width:100%;min-width:0;height:46px;padding:8px 11px;border-radius:8px;background:white;font:inherit;font-size:16px;color:var(--ink)}.header-search .btn{font-size:15px;padding:8px 13px;min-height:46px}.header-search input:focus{outline:2px solid var(--green);outline-offset:2px}.preview-search-status{font-size:15px;color:var(--dark);margin:0 0 18px}.preview-search-status button{font:inherit;color:var(--dark);background:transparent;border:0;text-decoration:underline;cursor:pointer}
@media(max-width:1100px){.nav{gap:13px}.top .nav>nav{gap:12px;font-size:14px}}
@media(max-width:760px){.top .nav>nav{margin-left:0}.header-search{position:static;margin-left:auto;order:1}.menu{order:2}.top .nav>nav{order:3}.header-search form{top:calc(100% + 6px);right:0}.header-search summary{width:42px;height:42px}.nav{gap:10px}.topics-panel{width:100%;max-height:55vh;border-width:0;border-left:3px solid var(--sgfh-outline)}.nested-topics{margin-left:14px}.topics-panel .nested-topics a{font-size:15px}.filters button,.topic-pill{border-width:3px}}
#topics .card{height:auto;min-height:156px;overflow:visible}#topics .card .premium-art{width:70px;height:70px}#topics .card h3{font-size:21px;line-height:1.18;overflow-wrap:anywhere}@media(max-width:1000px){#topics .card{min-height:145px}#topics .card h3{font-size:22px}}
/* V4: explicit section labels, parent accordion and safe card geometry. */
.topics-panel .topic-parent{border-bottom:2px solid #c5d3ca;padding:2px 0}.topics-panel .topic-parent:last-child{border-bottom:0}.topics-panel .topic-parent>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 13px;cursor:pointer;list-style:none;font-size:16px;font-weight:700;color:#445164;border-radius:7px}.topic-parent>summary::-webkit-details-marker{display:none}.topics-panel .topic-parent>summary:hover,.topics-panel .topic-parent.is-selected>summary{background:var(--soft);color:var(--dark)}.topic-chevron{display:inline-block;transition:transform .18s}.topic-parent[open]>.topic-chevron,.topic-parent[open]>summary .topic-chevron{transform:rotate(180deg)}.topic-parent-body{padding:0 2px 7px}.topics-panel .topic-view-all{font-size:13px;font-weight:700;color:var(--dark);padding:7px 13px!important}.topics-panel .nested-topics a.is-selected{background:var(--soft);color:var(--dark);font-weight:700}.topics-panel .topic-root-link{font-weight:600}
.header-search .search-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:46px;padding:0;border:3px solid var(--sgfh-outline);border-radius:8px;font-size:25px;line-height:1;color:var(--ink);background:white;cursor:pointer}.header-search .search-close:hover{border-color:var(--green);color:var(--green)}.header-search input{flex:1;min-width:0}.header-search form{gap:8px}
/* Put decorative assets in their own column; text can never sit beneath them. */
.tools-grid .tool{display:grid;grid-template-columns:minmax(0,1fr) 96px;align-items:center;gap:16px;padding:18px 20px;min-height:0}.tools-grid .tool .premium-art{position:static;grid-column:2;grid-row:1;width:96px;height:96px;margin:0}.tools-grid .tool>div:last-child{grid-column:1;grid-row:1;max-width:100%;min-width:0}.tools-grid .tool h3,.tools-grid .tool p{max-width:100%;min-height:0}.tools-grid .tool h3{margin:0 0 9px}.tools-grid .tool p{margin:0 0 12px}.tools-grid .tool .go{position:static;left:auto;right:auto;bottom:auto}
@media(max-width:760px){.tools-grid .tool{grid-template-columns:minmax(0,1fr) 76px;gap:12px;padding:18px}.tools-grid .tool .premium-art{width:76px;height:76px}.tools-grid .tool>div:last-child{max-width:100%}.tools-grid .tool h3{max-width:100%;font-size:23px;min-height:0}.tools-grid .tool p{max-width:100%;font-size:16px}.topics-panel .topic-parent>summary{font-size:16px;padding:10px 13px}}
@media(max-width:360px){.tools-grid .tool{grid-template-columns:minmax(0,1fr);gap:10px}.tools-grid .tool .premium-art{grid-column:1;grid-row:1;justify-self:end;width:68px;height:68px}.tools-grid .tool>div:last-child{grid-column:1;grid-row:2}}

/* Share the homepage typography across article and category templates. */
.article-heading h1,.archive-intro h1{font-size:34px;line-height:1.2;letter-spacing:-1.1px}.article-content h2{font-size:32px;font-weight:700}.article-content h3{font-size:24px;font-weight:700}.article-visual,.archive-empty,.image-viewer,.article-content th,.article-content td,.article-comments input:not([type=checkbox]),.article-comments textarea{border:3px solid var(--sgfh-outline)}.visual-controls,.viewer-toolbar{border-width:3px;border-color:var(--sgfh-divider)}.viewer-close{border:3px solid var(--ink)}
@media(max-width:760px){.article-heading h1,.archive-intro h1{font-size:32px;letter-spacing:-1px}.article-content h2{font-size:29px}.article-content h3{font-size:23px}.article-content{font-size:17px}}

@media(max-width:380px){.brand{font-size:21px}.nav{gap:7px}.menu{font-size:14px;padding:7px 8px}.header-search summary{width:38px;height:40px}#topics .card h3{font-size:19px;overflow-wrap:normal}#topics .card{min-height:145px}}
/* V5: clear topic hierarchy and accessible subtopic controls. */
.archive-count{font-size:22px;font-weight:700;color:var(--dark);line-height:1.4}.sgfh-page .archive-topics .topic-pill{font-weight:700;font-size:17px}.sgfh-page .subtopic-buttons{display:block!important;padding:20px 0 24px;margin:0 0 20px!important;border-top:3px solid var(--sgfh-divider);border-bottom:3px solid var(--sgfh-divider)}.subtopic-buttons h2{color:var(--ink);font-size:23px;font-weight:700;margin:0 0 14px}.subtopic-list{display:flex;flex-wrap:wrap;gap:10px}.sgfh-page .subtopic-button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:8px 17px;border:3px solid var(--sgfh-outline);border-radius:10px;background:white;color:var(--dark);font-size:18px;font-weight:700;line-height:1.3}.sgfh-page .subtopic-button:hover{border-color:var(--green);background:var(--soft)}.sgfh-page .subtopic-button.current{background:var(--green);border-color:var(--green);color:white}.archive-intro .eyebrow{font-size:14px}
@media(max-width:760px){.archive-count{font-size:21px}.sgfh-page .archive-topics .topic-pill{font-size:16px}.sgfh-page .subtopic-button{font-size:17px;padding:8px 13px}.subtopic-buttons h2{font-size:22px}}
