/* Responsive geometry only. Editorial identity and isolated tool documents stay unchanged. */
body.sf-site .sf-wrap {
    width: min(1400px, calc(100% - 80px));
    max-width: none;
    margin-inline: auto;
}
.sf-grid-3, .sf-grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sf-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
.sf-topic-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sf-archive-hero { grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); }
.sf-theme-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sf-footer-top { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, .8fr); }
.sf-hero > *, .sf-topic-layout > *, .sf-archive-hero > *, .sf-footer-top > *,
.sf-newsletter > *, .sf-article-layout > *, .sf-section-heading > * { min-width: 0; }
.sf-site :is(h1,h2,h3,.sf-breadcrumbs,.sf-faq,.sf-footer,.sf-category-tools) { overflow-wrap: anywhere; }
.sf-article-header { max-width: 1100px; }
/* post_class() includes Astra's single-article class: avoid a second inner gutter. */
.sf-site .sf-article-main > .sf-article.ast-article-single { padding: 0; }
.sf-article-hero { max-width: 1280px; }
.sf-article-layout { max-width: 1280px; margin-inline: auto; grid-template-columns: minmax(0, 880px) minmax(0, 300px); gap: 48px; }
.sf-article-layout:has(.sf-sidebar-sticky:empty) { display: block; max-width: 920px; }
.sf-article-sidebar:has(.sf-sidebar-sticky:empty) { display: none; }
.sf-page-content:has(.sf-tool-embed) { max-width: 1120px; }
.sf-page-content, .sf-prose, .sf-tool-embed { min-width: 0; }
.sf-tool-frame { width: 100%; max-width: 100%; }
.sf-prose figure > img { width: 100%; height: auto; }
.sf-prose table { overscroll-behavior-inline: contain; }
.sf-prose table:focus-visible { outline: 2px solid var(--sf-red); outline-offset: 3px; }
.sf-pagination, .pagination, .pagination .nav-links { max-width: 100%; flex-wrap: wrap; }
.sf-ad-slot, .sf-ad-placeholder { min-width: 0; max-width: 100%; }
.sf-contact-form :is(input:not([type=hidden]),textarea) { width: 100%; min-width: 0; max-width: 100%; min-height: 48px; font-size: 16px; }
.sf-contact-form button { min-height: 48px; white-space: normal; }

@media (max-width: 1100px) {
    body.sf-site .sf-wrap { width: calc(100% - 48px); }
}
@media (max-width: 1024px) {
    .sf-grid-3, .sf-grid-4, .sf-theme-links, .sf-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sf-tool-card, .sf-tool-card:nth-child(3) { border-right: 1px solid var(--sf-border); border-bottom: 1px solid var(--sf-border); }
    .sf-tool-card:nth-child(2n) { border-right: 0; }
    .sf-tool-card:nth-last-child(-n+2) { border-bottom: 0; }
    .sf-grid-3 > .sf-card:last-child:nth-child(3) { grid-column: auto; max-width: none; }
    .sf-tagline { display: none; }
    .sf-header-tools { margin-left: auto; }
    .sf-menu-toggle { display: flex; align-items: center; gap: 9px; margin-left: 4px; padding: 10px 0 10px 12px; }
    .sf-nav-border { border-bottom: 0; }
    body.sf-site .sf-nav.sf-wrap {
        display: none; position: absolute; inset-inline: 0; top: 100%;
        width: 100%; max-width: none; margin: 0; padding: 15px 24px 24px;
        max-height: calc(100vh - 84px); max-height: calc(100dvh - 84px);
        overflow-y: auto; overscroll-behavior: contain;
        background: #fff; box-shadow: 0 16px 24px #0002; gap: 0; align-items: stretch;
    }
    body.sf-site .sf-nav.is-open { display: flex; flex-direction: column; }
    .sf-nav > a { padding: 12px; min-height: 44px; font-size: 14px; line-height: 1.5; white-space: normal; border-bottom: 1px solid #eee; }
    .sf-nav > a.is-current:after { display: none; }
    .sf-search > summary { min-height: 44px; padding: 14px 12px; }
    .sf-search-panel { position: static; width: 100%; box-shadow: none; border: 0; padding: 0 12px; }
    .sf-search-form input { min-height: 48px; font-size: 16px; }
    .sf-search-form button { min-height: 48px; }
    .sf-topic-layout { grid-template-columns: minmax(0, 1fr); }
    .sf-topic-feature { min-height: 310px; }
    .sf-topic-stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .sf-topic-stories .sf-card { display: block; padding: 0; margin: 0; border: 0; }
    .sf-topic-stories .sf-card-image { height: auto; aspect-ratio: 1.6; margin-bottom: 14px; }
    .sf-article-layout { display: block; }
    .sf-article-body { max-width: 880px; margin-inline: auto; }
    .sf-article-sidebar { display: none; }
}
@media (max-width: 800px) {
    body.sf-site .sf-wrap { width: calc(100% - 40px); }
    .sf-hero, .sf-archive-hero { grid-template-columns: minmax(0, 1fr); }
    .sf-footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sf-footer-top > div:first-child { grid-column: 1 / -1; }
    .sf-article-header h1 { font-size: clamp(32px, 5.4vw, 41px); }
}
@media (max-width: 600px) {
    body.sf-site .sf-wrap { width: calc(100% - 32px); }
    .sf-grid-3, .sf-grid-4, .sf-topic-stories, .sf-theme-links, .sf-tool-grid { grid-template-columns: minmax(0, 1fr); }
    .sf-header-tools { display: none; }
    .sf-menu-toggle { margin-left: auto; }
    .sf-topic-stories .sf-card { display: block; padding: 0; margin: 0; border: 0; }
    .sf-topic-stories .sf-card-image { width: 100%; height: auto; aspect-ratio: 1.65; margin-bottom: 14px; }
    .sf-topic-stories .sf-card h3 { font-size: 24px; }
    .sf-tool-card { border-right: 0 !important; border-bottom: 1px solid var(--sf-border) !important; }
    .sf-tool-card:last-child { border-bottom: 0 !important; }
    .sf-tool-image { height: auto; aspect-ratio: 1.8; }
    .sf-tool-image > img { width: 100%; height: 100%; }
    .sf-tool-card > div:last-child { padding: 18px 20px 24px; min-height: 0; }
    .sf-tool-card h3 { font-size: 15px; max-width: none; }
    .sf-tool-card p { font-size: 13px; max-width: none; }
    .sf-hero-copy { padding-inline: clamp(18px, 5vw, 27px); }
    .sf-hero-copy h1 { font-size: clamp(31px, 8.5vw, 40px); }
    .sf-hero-copy .sf-button { max-width: 100%; min-height: 48px; gap: 16px; }
    .sf-hero-credit { left: 16px; right: 16px; text-align: right; }
    .sf-breadcrumbs > [aria-current=page] { white-space: normal; overflow: visible; text-overflow: clip; }
    .sf-category-tools a { min-height: 44px; }
    .sf-footer nav a { font-size: 12px; line-height: 1.5; padding-block: 9px; margin: 0; }
    .sf-footer nav h2 { line-height: 1.5; }
    .sf-footer-top { column-gap: 24px; }
    .sf-disclaimer { font-size: 11px; line-height: 1.8; }
    .sf-footer-bottom { font-size: 10px; }
    .sf-search-panel { padding: 0; }
}
@media print {
    body.sf-site .sf-wrap { width: 100%; }
    .sf-article-layout { display: block; }
}
