@font-face {
    font-family: "Mulish";
    src: url("fonts/mulish-700.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Mulish";
    src: url("fonts/mulish-800.woff2") format("woff2");
    font-style: normal;
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: "Public Sans";
    src: url("fonts/public-sans-400.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Public Sans";
    src: url("fonts/public-sans-600.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

:root {
    color-scheme: light;
    --accent: #0879aa;
    --accent-hover: #076d99;
    --accent-deep: #0b5f85;
    --accent-tint: #e7f6fc;
    --ink: #14181f;
    --muted: rgba(20, 24, 31, 0.64);
    --canvas: #f6f9fc;
    --paper: #fff;
    --line: #e3eaf2;
    --surface: #f2f6fa;
    --shadow-soft: 0 1px 2px rgba(16, 32, 52, 0.04), 0 10px 30px rgba(16, 32, 52, 0.055);
    --shadow-lift: 0 3px 8px rgba(16, 32, 52, 0.07), 0 20px 48px rgba(16, 32, 52, 0.10);
    --bloom: radial-gradient(54vw 38vw at 5% -8%, rgba(17, 161, 224, 0.15), transparent 62%), radial-gradient(42vw 32vw at 98% 2%, rgba(98, 195, 151, 0.09), transparent 64%);
    --header-bg: rgba(255, 255, 255, 0.92);
    --header-border: rgba(227, 234, 242, 0.92);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --accent: #0879aa;
        --accent-hover: #076d99;
        --accent-deep: #38bdf8;
        --accent-tint: rgba(17, 161, 224, 0.16);
        --ink: #f1f5f9;
        --muted: rgba(241, 245, 249, 0.68);
        --canvas: #090d14;
        --paper: #111823;
        --line: #1e293b;
        --surface: #182232;
        --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.35), 0 10px 32px rgba(0, 0, 0, 0.45);
        --shadow-lift: 0 4px 12px rgba(0, 0, 0, 0.45), 0 20px 48px rgba(0, 0, 0, 0.6);
        --bloom: radial-gradient(54vw 38vw at 5% -8%, rgba(17, 161, 224, 0.18), transparent 62%), radial-gradient(42vw 32vw at 98% 2%, rgba(98, 195, 151, 0.10), transparent 64%);
        --header-bg: rgba(17, 24, 35, 0.90);
        --header-border: rgba(30, 41, 59, 0.90);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --accent: #0879aa;
    --accent-hover: #076d99;
    --accent-deep: #38bdf8;
    --accent-tint: rgba(17, 161, 224, 0.16);
    --ink: #f1f5f9;
    --muted: rgba(241, 245, 249, 0.68);
    --canvas: #090d14;
    --paper: #111823;
    --line: #1e293b;
    --surface: #182232;
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.35), 0 10px 32px rgba(0, 0, 0, 0.45);
    --shadow-lift: 0 4px 12px rgba(0, 0, 0, 0.45), 0 20px 48px rgba(0, 0, 0, 0.6);
    --bloom: radial-gradient(54vw 38vw at 5% -8%, rgba(17, 161, 224, 0.18), transparent 62%), radial-gradient(42vw 32vw at 98% 2%, rgba(98, 195, 151, 0.10), transparent 64%);
    --header-bg: rgba(17, 24, 35, 0.90);
    --header-border: rgba(30, 41, 59, 0.90);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--canvas);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background-color: var(--canvas);
    background-image: var(--bloom);
    background-attachment: fixed;
    font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
button {
    font: inherit;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.page-shell {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 20px 0 52px;
}

.site-header {
    position: sticky;
    z-index: 10;
    top: 14px;
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 12px 10px 18px;
    border: 1px solid var(--header-border);
    border-radius: 18px;
    background: var(--header-bg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.brand-link {
    display: inline-flex;
    border-radius: 12px;
}

.brand-logo-frame {
    display: inline-flex;
}

.brand-logo {
    display: block;
    width: clamp(168px, 18vw, 204px);
    height: auto;
}

.site-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.theme-switcher {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    gap: 2px;
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.theme-btn:hover {
    color: var(--ink);
    background: var(--paper);
}

.theme-btn.is-active {
    color: var(--accent-deep);
    background: var(--paper);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.theme-btn svg {
    display: block;
    width: 14px;
    height: 14px;
}

.site-link,
.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 8px 18px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 2px 8px rgba(17, 161, 224, 0.24);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.site-link:hover,
.button:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(17, 161, 224, 0.38);
    transform: translateY(-1px);
}

.page-header {
    max-width: 800px;
    padding: clamp(52px, 8vw, 88px) 0 42px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-deep);
    font-size: clamp(0.6875rem, 0.66rem + 0.12vw, 0.8125rem);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    font-family: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
}

h1 {
    margin: 0;
    font-size: clamp(2.5rem, 1.7rem + 2.7vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.page-intro {
    max-width: 640px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
    line-height: 1.6;
}

.feed-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.feed-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 5px 14px;
    border: 1px solid rgba(17, 161, 224, 0.28);
    border-radius: 999px;
    background: var(--paper);
    color: var(--accent-deep);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(17, 161, 224, 0.08);
    backdrop-filter: blur(8px);
    transition: all 160ms ease;
}

.feed-badge-pill:hover {
    border-color: var(--accent);
    background: var(--accent-tint);
    color: var(--accent-deep);
    transform: translateY(-1px);
}

.feed-badge-pill.secondary {
    border-color: var(--line);
    color: var(--muted);
    background: var(--paper);
}

.feed-badge-pill.secondary:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
    background: var(--accent-tint);
}

.pulse-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.discover-content {
    min-height: 260px;
}

.discover-section {
    margin-bottom: 40px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.section-title::after {
    min-width: 24px;
    height: 1px;
    flex: 1;
    background: var(--line);
    content: "";
}

.feed-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 16px;
    max-width: 100%;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    max-width: 440px;
}

.search-wrapper svg {
    position: absolute;
    left: 12px;
    color: var(--muted);
    pointer-events: none;
}

.feed-search-input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 34px 0 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    box-shadow: 0 1px 2px rgba(16, 32, 52, 0.03);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.feed-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(8, 121, 170, 0.16);
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background 140ms, color 140ms;
}

.search-clear-btn:hover {
    background: var(--line);
    color: var(--ink);
}

.view-toggle {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(16, 32, 52, 0.03);
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 160ms ease;
}

.view-toggle-btn:hover {
    color: var(--ink);
}

.view-toggle-btn.is-active {
    background: var(--paper);
    color: var(--accent-deep);
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(16, 32, 52, 0.08);
}

.source-filter-select {
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.source-filter-select:hover,
.source-filter-select:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-tint);
}

.source-filter-select option {
    background: var(--paper);
    color: var(--ink);
}

.export-menu-wrapper {
    position: relative;
    display: inline-flex;
}

.export-action-btn {
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 160ms ease;
}

.export-action-btn:hover,
.export-action-btn:focus-visible {
    border-color: var(--accent);
    color: var(--accent-deep);
    box-shadow: 0 0 0 2px var(--accent-tint);
}

.export-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 210px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.export-dropdown[hidden] {
    display: none;
}

.export-dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease;
}

.export-dropdown-item:hover,
.export-dropdown-item:focus-visible {
    background: var(--accent-tint);
    color: var(--accent-deep);
    outline: none;
}

.feed-controls-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    max-width: 100%;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 5px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(12, 23, 42, 0.04);
    transition: all 160ms ease;
    overflow-wrap: anywhere;
}

.filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
    background: var(--accent-tint);
    transform: translateY(-1px);
}

.filter-pill.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(17, 161, 224, 0.28);
}

.filter-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 36px 20px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: var(--paper);
    text-align: center;
}

.filter-empty-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

.filter-reset-btn {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 18px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent-tint);
    color: var(--accent-deep);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 160ms ease;
}

.filter-reset-btn:hover {
    background: var(--accent);
    color: #fff;
}

.feed-card:target {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(17, 161, 224, 0.25), var(--shadow-lift);
}

.card-grid,
.loading-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.discover-card,
.state-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: var(--shadow-soft);
}

.discover-card {
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.discover-card:hover {
    border-color: rgba(17, 161, 224, 0.34);
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.feed-card {
    display: flex;
    min-height: 260px;
    flex-direction: column;
}

.feed-card .card-body {
    padding: 20px;
}

.feed-card.is-read {
    opacity: 0.85;
}

.feed-card.is-read .card-title-link {
    color: var(--muted);
}

.feed-card.is-read:hover {
    opacity: 1;
}

.feed-card.is-read:hover .card-title-link {
    color: var(--accent-deep);
}

.promotion-card {
    border-color: rgba(17, 161, 224, 0.24);
    border-top: 3px solid var(--accent);
    background: linear-gradient(145deg, var(--paper) 68%, var(--accent-tint));
}

.promotion-card:hover {
    border-color: rgba(17, 161, 224, 0.45);
    box-shadow: 0 8px 24px rgba(17, 161, 224, 0.16);
}

.eyebrow-featured {
    color: var(--accent-deep);
    letter-spacing: 0.1em;
}

.feed-image {
    width: 100%;
    height: 184px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    object-fit: cover;
}

.card-meta {
    display: flex;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.card-source {
    color: var(--accent-deep);
    font-weight: 600;
}

.card-source-group {
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    gap: 7px;
}

.source-icon-frame {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.source-icon {
    display: block;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    object-fit: contain;
}

@media (prefers-color-scheme: dark) {
    .source-icon:not([data-has-dual-icon="true"]) {
        background: #ffffff;
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    }

    .source-icon[data-has-dual-icon="true"] {
        background: transparent;
        border-color: var(--line);
    }
}

:root[data-theme="dark"] .source-icon:not([data-has-dual-icon="true"]),
.dark-theme .source-icon:not([data-has-dual-icon="true"]) {
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

:root[data-theme="dark"] .source-icon[data-has-dual-icon="true"],
.dark-theme .source-icon[data-has-dual-icon="true"] {
    background: transparent;
    border-color: var(--line);
}

.card-date::before,
.card-read-time::before {
    margin-right: 10px;
    color: rgba(20, 24, 31, 0.28);
    content: "•";
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .card-date::before,
    :root:not([data-theme="light"]) .card-read-time::before {
        color: rgba(241, 245, 249, 0.28);
    }
}

:root[data-theme="dark"] .card-date::before,
:root[data-theme="dark"] .card-read-time::before {
    color: rgba(241, 245, 249, 0.28);
}

.tag-list {
    display: flex;
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 16px;
}

.tag {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--accent-deep);
    background: var(--surface);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.tag.interactive-tag {
    cursor: pointer;
}

.tag.interactive-tag:hover {
    border-color: var(--accent);
    background: var(--accent-tint);
    color: var(--accent-deep);
    transform: translateY(-1px);
}

.card-body {
    display: flex;
    min-width: 0;
    max-width: 100%;
    flex: 1;
    flex-direction: column;
}

.card-title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

.card-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 160ms ease;
}

.card-title-link:hover,
.feed-card:hover .card-title-link {
    color: var(--accent-deep);
}

.card-copy {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.card-actions {
    display: flex;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
}

.card-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--muted);
    cursor: pointer;
    transition: all 160ms ease;
    flex-shrink: 0;
}

.card-share-btn:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
    background: var(--accent-tint);
    transform: translateY(-1px);
}

.card-share-btn.is-copied {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.card-action-utilities {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.card-bookmark-btn.is-bookmarked {
    border-color: #f59e0b;
    color: #d97706;
    background: rgba(245, 158, 11, 0.12);
}

.card-bookmark-btn.is-bookmarked:hover {
    border-color: #d97706;
    color: #b45309;
    background: rgba(245, 158, 11, 0.20);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .card-bookmark-btn.is-bookmarked {
        border-color: rgba(245, 158, 11, 0.45);
        color: #fbbf24;
        background: rgba(245, 158, 11, 0.16);
    }

    :root:not([data-theme="light"]) .card-bookmark-btn.is-bookmarked:hover {
        border-color: #f59e0b;
        color: #fde68a;
        background: rgba(245, 158, 11, 0.26);
    }
}

:root[data-theme="dark"] .card-bookmark-btn.is-bookmarked {
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.16);
}

:root[data-theme="dark"] .card-bookmark-btn.is-bookmarked:hover {
    border-color: #f59e0b;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.26);
}

.card-grid.is-list-view {
    grid-template-columns: 1fr;
    gap: 12px;
}

.card-grid.is-list-view .feed-card {
    min-height: auto;
    flex-direction: row;
    align-items: stretch;
}

.card-grid.is-list-view .feed-image {
    width: 200px;
    height: auto;
    min-height: 100%;
    border-bottom: none;
    border-right: 1px solid var(--line);
    flex-shrink: 0;
}

.card-grid.is-list-view .card-body {
    padding: 16px 20px;
}

@media (max-width: 640px) {
    .card-grid.is-list-view .feed-card {
        flex-direction: column;
    }

    .card-grid.is-list-view .feed-image {
        width: 100%;
        height: 160px;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
}

.card-source-group,
.card-source,
.card-date,
.card-read-time,
.card-title,
.card-copy,
.tag,
.card-actions .button,
.card-actions .text-link {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.discover-card.is-keyboard-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-tint), var(--shadow-lift);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.card-actions .text-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.text-link {
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--accent-deep);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.text-link::after {
    content: "→";
    display: inline-block;
    transition: transform 160ms ease;
}

.text-link:hover {
    background: var(--accent-tint);
    color: var(--accent-deep);
}

.text-link:hover::after {
    transform: translateX(3px);
}

.state-card {
    display: flex;
    min-height: 150px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 28px;
    border-style: dashed;
    text-align: left;
}

.state-icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, #0879aa, #076d99);
    font-family: "Mulish", sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
}

.state-title {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.2;
}

.state-copy {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.error-state {
    justify-content: space-between;
}

.loading-card {
    min-height: 154px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(100deg, var(--paper) 20%, var(--surface) 40%, var(--paper) 60%);
    background-size: 220% 100%;
    box-shadow: var(--shadow-soft);
    animation: shimmer 1.4s ease-in-out infinite;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.site-footer a {
    border-radius: 6px;
    color: var(--accent-deep);
    font-weight: 600;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
}

@keyframes shimmer {
    to {
        background-position: -220% 0;
    }
}

@media (max-width: 840px) {
    .page-shell {
        width: min(100% - 32px, 680px);
    }

    .card-grid,
    .loading-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 24px, 520px);
        padding-top: 16px;
    }

    .site-header {
        top: 8px;
        gap: 8px;
        min-height: 52px;
        padding: 6px 8px 6px 10px;
        border-radius: 15px;
    }

    .brand-logo {
        width: clamp(120px, 36vw, 150px);
    }

    .site-header-actions {
        gap: 6px;
    }

    .theme-btn {
        width: 24px;
        height: 24px;
    }

    .theme-btn svg {
        width: 12px;
        height: 12px;
    }

    .site-link {
        min-height: 32px;
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .page-header {
        padding: 46px 0 34px;
    }

    .state-card,
    .error-state {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .site-header .site-link {
        display: none;
    }
}

.shortcuts-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    color: var(--accent-deep);
    font: inherit;
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: color 160ms ease;
}

.shortcuts-footer-btn:hover {
    color: var(--ink);
    text-decoration: underline;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow-lift);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    animation: toastSlideIn 220ms cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-exiting {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 560px) {
    .toast-container {
        bottom: 16px;
        left: 16px;
        right: 16px;
        align-items: center;
    }

    .toast {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

.shortcuts-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(9, 13, 20, 0.68);
    backdrop-filter: blur(8px);
    animation: fadeIn 180ms ease;
}

.shortcuts-modal-overlay[hidden] {
    display: none !important;
}

.shortcuts-modal-dialog {
    width: min(440px, calc(100% - 32px));
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow-lift);
    padding: 24px;
    animation: scaleIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.shortcuts-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.shortcuts-modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
}

.modal-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: all 140ms ease;
}

.modal-close-btn:hover {
    border-color: var(--accent);
    color: var(--ink);
    background: var(--accent-tint);
}

.shortcuts-list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shortcuts-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.shortcuts-keys {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 0.8125rem;
}

.shortcut-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.shortcuts-desc {
    margin: 0;
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: right;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.subscribe-intro {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.subscribe-feed-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.subscribe-feed-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.subscribe-feed-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.subscribe-feed-title-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.subscribe-feed-name {
    font-size: 0.9375rem;
    color: var(--ink);
}

.subscribe-feed-desc {
    font-size: 0.75rem;
    color: var(--muted);
}

.subscribe-feed-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.subscribe-feed-actions .button {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

.subscribe-quick-readers {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 0.8125rem;
}

.subscribe-quick-label {
    color: var(--muted);
}

@media (max-width: 560px) {
    .subscribe-feed-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .subscribe-feed-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
