/*
==============================================================================
SavvyGreat Material 3 news category experience
Copyright (c) 2026 SavvyGreat. All rights reserved.
==============================================================================
*/

body[data-sgcv-controller="News"][data-sgcv-action="NationalNewsCategory"] .sgcv-m3-page,
body[data-sgcv-controller="News"][data-sgcv-action="InterNationalNewsCategory"] .sgcv-m3-page {
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: clamp(8px, 1.25vw, 18px) clamp(12px, 2vw, 30px) clamp(34px, 5vw, 72px);
}

.sgcat-m3,
.sgcat-m3 * {
    box-sizing: border-box;
}

.sgcat-m3 {
    --sgcat-primary: var(--md-sys-color-primary, #6750a4);
    --sgcat-on-primary: var(--md-sys-color-on-primary, #ffffff);
    --sgcat-primary-container: var(--md-sys-color-primary-container, #eaddff);
    --sgcat-on-primary-container: var(--md-sys-color-on-primary-container, #21005d);
    --sgcat-secondary-container: var(--md-sys-color-secondary-container, #e8def8);
    --sgcat-on-secondary-container: var(--md-sys-color-on-secondary-container, #1d192b);
    --sgcat-tertiary-container: var(--md-sys-color-tertiary-container, #ffd8e4);
    --sgcat-on-tertiary-container: var(--md-sys-color-on-tertiary-container, #31111d);
    --sgcat-surface: var(--md-sys-color-surface, #fff7ff);
    --sgcat-surface-container-low: var(--md-sys-color-surface-container-low, #f7f2fa);
    --sgcat-surface-container: var(--md-sys-color-surface-container, #f3edf7);
    --sgcat-surface-container-high: var(--md-sys-color-surface-container-high, #ece6f0);
    --sgcat-on-surface: var(--md-sys-color-on-surface, #1d1b20);
    --sgcat-on-surface-variant: var(--md-sys-color-on-surface-variant, #49454f);
    --sgcat-outline: var(--md-sys-color-outline, #79747e);
    --sgcat-outline-variant: var(--md-sys-color-outline-variant, #cac4d0);
    width: min(100%, 1600px);
    margin: var(--sgcat-context-gap, 0px) auto 0;
    color: var(--sgcat-on-surface);
    font-family: var(--m3-font-plain, "Segoe UI", sans-serif);
}

.sgcat-m3 a {
    color: inherit;
    text-decoration: none;
}

.sgcat-m3 button,
.sgcat-m3 input {
    font: inherit;
}

.sgcat-m3 button,
.sgcat-m3 a {
    -webkit-tap-highlight-color: transparent;
}

.sgcat-m3 button:focus-visible,
.sgcat-m3 a:focus-visible,
.sgcat-m3 input:focus-visible,
.sgcat-m3 [tabindex="0"]:focus-visible {
    outline: 3px solid var(--sgcat-primary);
    outline-offset: 3px;
}

.sgcat-m3-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--sgcat-primary);
    font-size: 12px;
    font-weight: 780;
    letter-spacing: .09em;
    line-height: 18px;
    text-transform: uppercase;
}

.sgcat-m3-eyebrow .material-symbols-rounded {
    font-size: 19px;
    font-variation-settings: "FILL" 1, "wght" 650, "GRAD" 0, "opsz" 20;
}

.sgcat-m3-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr);
    gap: clamp(22px, 3vw, 54px);
    align-items: center;
    min-height: clamp(220px, 21vw, 330px);
    padding: clamp(24px, 3.8vw, 54px);
    overflow: hidden;
    border: 1px solid var(--sgcat-outline-variant);
    border-radius: clamp(28px, 3vw, 42px);
    background:
        radial-gradient(circle at 88% 14%, color-mix(in srgb, var(--sgcat-tertiary-container) 85%, transparent) 0 16%, transparent 17%),
        radial-gradient(circle at 73% 88%, color-mix(in srgb, var(--sgcat-primary-container) 90%, transparent) 0 25%, transparent 26%),
        linear-gradient(135deg, var(--sgcat-surface-container-low), var(--sgcat-surface-container));
    box-shadow: 0 2px 5px color-mix(in srgb, #000 13%, transparent);
}

.sgcat-m3-hero-copy {
    position: relative;
    z-index: 1;
}

.sgcat-m3-hero h1 {
    max-width: 20ch;
    margin: 10px 0 12px;
    font-family: var(--m3-font-brand, "Segoe UI", sans-serif);
    font-size: clamp(32px, 4vw, 58px);
    font-weight: 650;
    letter-spacing: -.038em;
    line-height: 1.02;
}

.sgcat-m3-hero-copy > p {
    max-width: 66ch;
    margin: 0;
    color: var(--sgcat-on-surface-variant);
    font-size: clamp(14px, 1.2vw, 18px);
    line-height: 1.5;
}

.sgcat-m3-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.sgcat-m3-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 23px;
    font-size: 14px;
    font-weight: 750;
    transition: transform 180ms cubic-bezier(.2, 0, 0, 1), box-shadow 180ms cubic-bezier(.2, 0, 0, 1), background 160ms linear;
}

.sgcat-m3-button .material-symbols-rounded {
    font-size: 21px;
}

.sgcat-m3-button-filled {
    background: var(--sgcat-primary);
    color: var(--sgcat-on-primary) !important;
    box-shadow: 0 1px 2px color-mix(in srgb, #000 20%, transparent);
}

.sgcat-m3-button-tonal {
    background: var(--sgcat-secondary-container);
    color: var(--sgcat-on-secondary-container) !important;
}

.sgcat-m3-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px color-mix(in srgb, #000 16%, transparent);
}

.sgcat-m3-section-switcher {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.sgcat-m3-section-switcher > a {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 24px;
    gap: 12px;
    align-items: center;
    min-height: 74px;
    padding: 11px 14px;
    border: 1px solid var(--sgcat-outline-variant);
    border-radius: 24px;
    background: color-mix(in srgb, var(--sgcat-surface) 80%, transparent);
    transition: transform 180ms cubic-bezier(.2, 0, 0, 1), background 160ms linear, border-color 160ms linear;
}

.sgcat-m3-section-switcher > a.is-selected {
    border-color: var(--sgcat-primary);
    background: var(--sgcat-primary-container);
    color: var(--sgcat-on-primary-container);
}

.sgcat-m3-section-switcher > a:hover {
    transform: translateX(4px);
    background: var(--sgcat-surface);
}

.sgcat-m3-section-switcher > a > .material-symbols-rounded:first-child {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 18px;
    background: var(--sgcat-secondary-container);
    color: var(--sgcat-on-secondary-container);
    font-size: 25px;
    font-variation-settings: "FILL" 1, "wght" 550, "GRAD" 0, "opsz" 24;
}

.sgcat-m3-section-switcher > a.is-selected > .material-symbols-rounded:first-child {
    background: var(--sgcat-primary);
    color: var(--sgcat-on-primary);
}

.sgcat-m3-section-switcher b,
.sgcat-m3-section-switcher small {
    display: block;
}

.sgcat-m3-section-switcher b {
    font-size: 15px;
}

.sgcat-m3-section-switcher small {
    margin-top: 3px;
    color: var(--sgcat-on-surface-variant);
    font-size: 11px;
}

.sgcat-m3-category-surface,
.sgcat-m3-feed,
.sgcat-m3-relation-panel {
    margin-top: clamp(24px, 3.5vw, 48px);
}

.sgcat-m3-category-surface {
    padding: clamp(18px, 2.5vw, 30px);
    border: 1px solid var(--sgcat-outline-variant);
    border-radius: 32px;
    background: var(--sgcat-surface-container-low);
}

.sgcat-m3-section-heading,
.sgcat-m3-feed-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.sgcat-m3-section-heading {
    margin-bottom: 16px;
}

.sgcat-m3-section-heading h2,
.sgcat-m3-feed-heading h2 {
    margin: 6px 0 0;
    font-family: var(--m3-font-brand, "Segoe UI", sans-serif);
    font-size: clamp(27px, 2.8vw, 42px);
    font-weight: 650;
    letter-spacing: -.032em;
    line-height: 1.08;
}

.sgcat-m3-section-heading p,
.sgcat-m3-feed-heading p {
    margin: 7px 0 0;
    color: var(--sgcat-on-surface-variant);
    font-size: 13px;
    line-height: 1.45;
}

.sgcat-m3-rail-controls,
.sgcat-m3-view-toggle {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border-radius: 28px;
    background: var(--sgcat-surface-container);
}

.sgcat-m3-rail-controls button,
.sgcat-m3-view-toggle button {
    position: relative;
    display: inline-grid;
    width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--sgcat-on-surface-variant);
    cursor: pointer;
    transition: background 160ms linear, color 160ms linear, transform 180ms cubic-bezier(.2, 0, 0, 1), opacity 160ms linear;
}

.sgcat-m3-rail-controls button::before,
.sgcat-m3-view-toggle button::before {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: currentColor;
    content: "";
    opacity: 0;
}

.sgcat-m3-rail-controls button:hover::before,
.sgcat-m3-view-toggle button:hover::before {
    opacity: .08;
}

.sgcat-m3-rail-controls button:active::before,
.sgcat-m3-view-toggle button:active::before {
    opacity: .12;
}

.sgcat-m3-view-toggle button[aria-pressed="true"] {
    background: var(--sgcat-secondary-container);
    color: var(--sgcat-on-secondary-container);
}

.sgcat-m3-rail-controls button:disabled {
    cursor: default;
    opacity: .38;
}

.sgcat-m3-rail-controls button .material-symbols-rounded,
.sgcat-m3-view-toggle button .material-symbols-rounded {
    position: relative;
    z-index: 1;
    font-size: 25px;
    font-variation-settings: "FILL" 0, "wght" 550, "GRAD" 0, "opsz" 24;
}

.sgcat-m3-category-rail {
    display: grid;
    grid-auto-columns: minmax(150px, 188px);
    grid-auto-flow: column;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 3px 2px 9px;
    scroll-behavior: smooth;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sgcat-m3-category-rail::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.sgcat-m3-category-button {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 9px;
    min-height: 124px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--sgcat-outline-variant);
    border-radius: 24px;
    background: var(--sgcat-surface);
    scroll-snap-align: start;
    transition: transform 200ms cubic-bezier(.2, 0, 0, 1), box-shadow 200ms cubic-bezier(.2, 0, 0, 1), background 160ms linear, border-color 160ms linear;
}

.sgcat-m3-category-button::after {
    position: absolute;
    inset: 0;
    background: currentColor;
    content: "";
    opacity: 0;
    pointer-events: none;
}

.sgcat-m3-category-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px color-mix(in srgb, #000 13%, transparent);
}

.sgcat-m3-category-button:hover::after {
    opacity: .05;
}

.sgcat-m3-category-button.is-selected {
    border-color: var(--sgcat-primary);
    background: var(--sgcat-primary-container);
    color: var(--sgcat-on-primary-container);
}

.sgcat-m3-category-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 17px;
    background: var(--sgcat-secondary-container);
    color: var(--sgcat-on-secondary-container);
}

.sgcat-m3-category-button.is-selected .sgcat-m3-category-icon {
    background: var(--sgcat-primary);
    color: var(--sgcat-on-primary);
}

.sgcat-m3-category-icon .material-symbols-rounded {
    font-size: 26px;
    font-variation-settings: "FILL" 1, "wght" 540, "GRAD" 0, "opsz" 24;
}

.sgcat-m3-category-button b,
.sgcat-m3-category-button small {
    display: block;
}

.sgcat-m3-category-button b {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.sgcat-m3-category-button small {
    margin-top: 4px;
    color: var(--sgcat-on-surface-variant);
    font-size: 10px;
}

.sgcat-m3-feed {
    min-width: 0;
}

.sgcat-m3-feed-toolbar {
    margin-bottom: 18px;
}

.sgcat-m3-feed-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.sgcat-m3-search {
    display: grid;
    grid-template-columns: 24px minmax(140px, 260px) 40px;
    gap: 7px;
    align-items: center;
    min-height: 52px;
    padding: 0 6px 0 15px;
    border: 1px solid var(--sgcat-outline);
    border-radius: 26px;
    background: var(--sgcat-surface);
    transition: border-color 160ms linear, box-shadow 160ms linear;
}

.sgcat-m3-search:focus-within {
    border-color: var(--sgcat-primary);
    box-shadow: 0 0 0 1px var(--sgcat-primary);
}

.sgcat-m3-search > .material-symbols-rounded {
    color: var(--sgcat-on-surface-variant);
    font-size: 22px;
}

.sgcat-m3-search input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--sgcat-on-surface);
    font-size: 14px;
}

.sgcat-m3-search input::placeholder {
    color: var(--sgcat-on-surface-variant);
    opacity: .8;
}

.sgcat-m3-search button {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--sgcat-on-surface-variant);
    cursor: pointer;
}

.sgcat-m3-search button:hover {
    background: var(--sgcat-surface-container-high);
}

.sgcat-m3-story-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 24px);
}

.sgcat-m3-story-card {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sgcat-outline-variant);
    border-radius: 28px;
    background: var(--sgcat-surface-container-low);
    content-visibility: auto;
    contain-intrinsic-size: 520px;
    transition: transform 220ms cubic-bezier(.2, 0, 0, 1), box-shadow 220ms cubic-bezier(.2, 0, 0, 1), border-color 160ms linear;
}

.sgcat-m3-story-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--sgcat-primary) 45%, var(--sgcat-outline-variant));
    box-shadow: 0 9px 22px color-mix(in srgb, #000 14%, transparent);
}

.sgcat-m3-story-card.is-concealed,
.sgcat-m3-story-card.is-filter-hidden {
    display: none !important;
}

.sgcat-m3-story-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--sgcat-surface-container-high);
}

.sgcat-m3-story-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 520ms cubic-bezier(.2, 0, 0, 1);
}

.sgcat-m3-story-card:hover .sgcat-m3-story-media img {
    transform: scale(1.035);
}

.sgcat-m3-story-media img.is-unavailable {
    object-fit: contain;
    padding: 24px;
}

.sgcat-m3-story-body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 18px;
}

.sgcat-m3-story-meta,
.sgcat-m3-story-meta > span {
    display: flex;
    align-items: center;
}

.sgcat-m3-story-meta {
    color: var(--sgcat-on-surface-variant);
    font-size: 11px;
    font-weight: 650;
}

.sgcat-m3-story-meta > span {
    gap: 6px;
}

.sgcat-m3-story-meta .material-symbols-rounded {
    font-size: 17px;
}

.sgcat-m3-story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
}

.sgcat-m3-story-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 13px;
    background: var(--sgcat-surface-container-high);
    color: var(--sgcat-on-surface-variant);
    font-size: 10px;
    font-weight: 720;
}

.sgcat-m3-story-tags span.is-tonal {
    background: var(--sgcat-secondary-container);
    color: var(--sgcat-on-secondary-container);
}

.sgcat-m3-story-card h3 {
    display: -webkit-box;
    margin: 12px 0 8px;
    overflow: hidden;
    font-family: var(--m3-font-brand, "Segoe UI", sans-serif);
    font-size: clamp(18px, 1.45vw, 23px);
    font-weight: 650;
    letter-spacing: -.018em;
    line-height: 1.22;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.sgcat-m3-story-card h3 a::after {
    position: absolute;
    inset: 0;
    content: "";
}

.sgcat-m3-story-card p {
    display: -webkit-box;
    margin: 0 0 17px;
    overflow: hidden;
    color: var(--sgcat-on-surface-variant);
    font-size: 13px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.sgcat-m3-story-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    color: var(--sgcat-primary) !important;
    font-size: 13px;
    font-weight: 760;
}

.sgcat-m3-story-link .material-symbols-rounded {
    font-size: 19px;
}

.sgcat-m3-story-grid.is-list-view {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.sgcat-m3-story-grid.is-list-view .sgcat-m3-story-card {
    grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
    grid-template-rows: minmax(190px, auto);
    min-height: 210px;
}

.sgcat-m3-story-grid.is-list-view .sgcat-m3-story-media {
    height: 100%;
    aspect-ratio: auto;
}

.sgcat-m3-story-grid.is-list-view .sgcat-m3-story-body {
    justify-content: center;
    padding: 20px 24px;
}

.sgcat-m3-story-grid.is-list-view .sgcat-m3-story-card h3 {
    max-width: 46ch;
    font-size: clamp(20px, 2vw, 28px);
}

.sgcat-m3-story-grid.is-list-view .sgcat-m3-story-card p {
    max-width: 76ch;
    -webkit-line-clamp: 2;
}

.sgcat-m3-more-actions {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

.sgcat-m3-more-button {
    display: grid;
    grid-template-columns: 24px auto;
    gap: 2px 9px;
    align-items: center;
    min-height: 54px;
    padding: 8px 20px;
    border: 0;
    border-radius: 27px;
    background: var(--sgcat-secondary-container);
    color: var(--sgcat-on-secondary-container);
    cursor: pointer;
    font-size: 14px;
    font-weight: 760;
    transition: transform 180ms cubic-bezier(.2, 0, 0, 1), box-shadow 180ms cubic-bezier(.2, 0, 0, 1);
}

.sgcat-m3-more-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px color-mix(in srgb, #000 14%, transparent);
}

.sgcat-m3-more-button > .material-symbols-rounded {
    grid-row: 1 / span 2;
    font-size: 22px;
}

.sgcat-m3-more-button small {
    grid-column: 2;
    color: var(--sgcat-on-surface-variant);
    font-size: 10px;
    font-weight: 600;
}

.sgcat-m3-empty-filter,
.sgcat-m3-empty-state {
    display: grid;
    min-height: 250px;
    padding: 30px;
    place-items: center;
    align-content: center;
    text-align: center;
    border: 1px dashed var(--sgcat-outline);
    border-radius: 30px;
    background: var(--sgcat-surface-container-low);
}

.sgcat-m3-empty-filter > .material-symbols-rounded,
.sgcat-m3-empty-state > .material-symbols-rounded {
    margin-bottom: 10px;
    color: var(--sgcat-primary);
    font-size: 42px;
}

.sgcat-m3-empty-filter h3,
.sgcat-m3-empty-filter p,
.sgcat-m3-empty-state h3,
.sgcat-m3-empty-state p {
    margin: 0;
}

.sgcat-m3-empty-filter p,
.sgcat-m3-empty-state p {
    max-width: 50ch;
    margin-top: 7px;
    color: var(--sgcat-on-surface-variant);
    line-height: 1.5;
}

.sgcat-m3-empty-state .sgcat-m3-button {
    margin-top: 16px;
}

.sgcat-m3-relation-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-radius: 28px;
    background: var(--sgcat-primary-container);
    color: var(--sgcat-on-primary-container);
}

.sgcat-m3-relation-panel > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sgcat-m3-relation-panel > div > .material-symbols-rounded {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 18px;
    background: var(--sgcat-primary);
    color: var(--sgcat-on-primary);
    font-size: 25px;
    font-variation-settings: "FILL" 1;
}

.sgcat-m3-relation-panel b,
.sgcat-m3-relation-panel small {
    display: block;
}

.sgcat-m3-relation-panel small {
    margin-top: 3px;
    color: var(--sgcat-on-surface-variant);
    font-size: 11px;
}

.sgcat-m3-relation-panel nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.sgcat-m3-relation-panel nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 21px;
    background: color-mix(in srgb, var(--sgcat-surface) 72%, transparent);
    font-size: 12px;
    font-weight: 740;
}

.sgcat-m3-relation-panel nav a:hover {
    background: var(--sgcat-surface);
}

.sgcat-m3-relation-panel nav .material-symbols-rounded {
    font-size: 19px;
}

@media (max-width: 1199px) {
    .sgcat-m3-hero {
        grid-template-columns: minmax(0, 1fr) minmax(280px, .7fr);
    }

    .sgcat-m3-story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 839px) {
    body[data-sgcv-controller="News"][data-sgcv-action="NationalNewsCategory"] .sgcv-m3-page,
    body[data-sgcv-controller="News"][data-sgcv-action="InterNationalNewsCategory"] .sgcv-m3-page {
        padding: 8px 12px 42px;
    }

    .sgcat-m3-hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        padding: 27px;
    }

    .sgcat-m3-section-switcher {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sgcat-m3-feed-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .sgcat-m3-feed-actions {
        width: 100%;
        justify-content: space-between;
    }

    .sgcat-m3-search {
        flex: 1 1 auto;
        grid-template-columns: 24px minmax(100px, 1fr) 40px;
    }

    .sgcat-m3-relation-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .sgcat-m3-relation-panel nav {
        justify-content: flex-start;
    }
}

@media (max-width: 599px) {
    .sgcat-m3-hero {
        padding: 22px 18px;
        border-radius: 28px;
    }

    .sgcat-m3-hero h1 {
        font-size: clamp(30px, 10vw, 42px);
    }

    .sgcat-m3-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .sgcat-m3-section-switcher {
        grid-template-columns: minmax(0, 1fr);
    }

    .sgcat-m3-category-surface {
        padding: 17px;
        border-radius: 27px;
    }

    .sgcat-m3-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .sgcat-m3-rail-controls {
        align-self: flex-end;
    }

    .sgcat-m3-category-rail {
        grid-auto-columns: minmax(145px, 72vw);
    }

    .sgcat-m3-feed-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .sgcat-m3-search {
        width: 100%;
    }

    .sgcat-m3-view-toggle {
        align-self: flex-end;
    }

    .sgcat-m3-story-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .sgcat-m3-story-grid.is-list-view .sgcat-m3-story-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
    }

    .sgcat-m3-story-grid.is-list-view .sgcat-m3-story-media {
        aspect-ratio: 16 / 9;
    }

    .sgcat-m3-relation-panel {
        padding: 17px;
        border-radius: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgcat-m3 *,
    .sgcat-m3 *::before,
    .sgcat-m3 *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (forced-colors: active) {
    .sgcat-m3-hero,
    .sgcat-m3-category-surface,
    .sgcat-m3-category-button,
    .sgcat-m3-story-card,
    .sgcat-m3-relation-panel {
        border: 1px solid CanvasText;
    }
}
