/* Blog & Article Styles */
.hero {
    padding: 64px 0 24px;
}

.kicker {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
}

h1 {
    margin-bottom: 14px;
    font-size: 44px;
    line-height: 1.07;
    letter-spacing: -1px;
}

.hero p {
    max-width: 680px;
    color: var(--text-2);
    font-size: 16px;
    line-height: 1.6;
}

/* Author External Publications Action Chips */
.author-publications {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.pub-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 4px;
}

.pub-ext-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.pub-ext-link:hover {
    transform: translateY(-1.5px);
    color: var(--text);
    box-shadow: var(--shadow-md);
    background: var(--bg-card);
}

.pub-ext-logo {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), color 180ms ease;
    display: inline-block;
    vertical-align: middle;
}

.logo-medium {
    color: var(--text-2);
}
:is(html.light, body.light) .logo-medium {
    color: #18181b;
}

.logo-octoparse {
    color: #3b82f6;
}
:is(html.light, body.light) .logo-octoparse {
    color: #2563eb;
}

.logo-chat4data {
    color: var(--text);
}
:is(html.light, body.light) .logo-chat4data {
    color: #18181b;
}

.pub-ext-link:hover .pub-ext-logo {
    transform: scale(1.08);
}

.pub-ext-name {
    color: var(--text);
    font-weight: 550;
    letter-spacing: -0.01em;
}

.pub-ext-handle {
    color: var(--faint);
    font-size: 11.5px;
    font-weight: 400;
}

.pub-ext-icon {
    width: 11px;
    height: 11px;
    color: var(--faint);
    flex-shrink: 0;
    transition: transform 180ms ease, color 180ms ease;
}

.pub-ext-link:hover .pub-ext-icon {
    transform: translate(2px, -2px);
    color: currentColor;
}

/* Hover Accents by Publisher */
.pub-ext-medium:hover {
    border-color: rgba(255, 255, 255, 0.4);
}
:is(html.light, body.light) .pub-ext-medium:hover {
    border-color: rgba(24, 24, 27, 0.45);
}
.pub-ext-medium:hover .logo-medium {
    color: var(--text);
}
:is(html.light, body.light) .pub-ext-medium:hover .logo-medium {
    color: #09090b;
}

.pub-ext-octoparse:hover {
    border-color: rgba(59, 130, 246, 0.5);
    color: #3b82f6;
}
:is(html.light, body.light) .pub-ext-octoparse:hover {
    border-color: rgba(37, 99, 235, 0.4);
    color: #2563eb;
}
.pub-ext-octoparse:hover .pub-ext-name {
    color: #3b82f6;
}
:is(html.light, body.light) .pub-ext-octoparse:hover .pub-ext-name {
    color: #2563eb;
}

.pub-ext-chat4data:hover {
    border-color: rgba(251, 146, 60, 0.5);
    color: #fb923c;
}
:is(html.light, body.light) .pub-ext-chat4data:hover {
    border-color: rgba(234, 88, 12, 0.4);
    color: #b45309;
}
.pub-ext-chat4data:hover .pub-ext-name {
    color: #fb923c;
}
:is(html.light, body.light) .pub-ext-chat4data:hover .pub-ext-name {
    color: #b45309;
}
.pub-ext-chat4data:hover .logo-chat4data {
    color: var(--text);
}
:is(html.light, body.light) .pub-ext-chat4data:hover .logo-chat4data {
    color: #09090b;
}

.pub-ext-chat4data .pub-accent {
    color: #fb923c;
    transition: color 180ms ease;
}
:is(html.light, body.light) .pub-ext-chat4data .pub-accent {
    color: #b45309;
}

/* MediuMatch External Profile */
.pub-ext-mediumatch:hover {
    border-color: rgba(139, 92, 246, 0.5);
    color: #a78bfa;
}
:is(html.light, body.light) .pub-ext-mediumatch:hover {
    border-color: rgba(124, 58, 237, 0.4);
    color: #7c3aed;
}
.pub-ext-mediumatch:hover .pub-ext-name {
    color: #a78bfa;
}
:is(html.light, body.light) .pub-ext-mediumatch:hover .pub-ext-name {
    color: #7c3aed;
}
.pub-ext-mediumatch .logo-mediumatch {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    vertical-align: middle;
}
.pub-ext-mediumatch .pub-accent {
    color: #a78bfa;
    transition: color 180ms ease;
}
:is(html.light, body.light) .pub-ext-mediumatch .pub-accent {
    color: #7c3aed;
}
.pub-ext-mediumatch:hover .logo-mediumatch {
    color: #a78bfa;
}
:is(html.light, body.light) .pub-ext-mediumatch:hover .logo-mediumatch {
    color: #7c3aed;
}


/* Timeline-Style Filter (Matching Image 1) */
/* One aligned grid: label column | controls column. Wrappers flatten into it. */
.blog-filter-section {
    margin-top: 32px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 14px;
    align-items: baseline;
}

.blog-filter-toolbar,
.blog-filter-group,
.blog-sort-wrap {
    display: contents;
}

.article-search-field {
    position: relative;
    width: min(100%, 16rem);
}

.article-search-field svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

#article-search::placeholder {
    color: var(--muted);
}

#article-search:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: -1px;
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Sort row goes last, under Topic */
.blog-sort-label,
.blog-sort-select-wrapper {
    order: 1;
}

.blog-sort-select-wrapper {
    justify-self: start;
}

.blog-filter-label {
    color: var(--faint);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 2px;
    min-width: 44px;
}

.blog-filter-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-sort-label {
    color: var(--faint);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.blog-sort-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.blog-sort-select,
#article-search {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-2);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12.5px;
    font-weight: 450;
    border-radius: 999px;
    line-height: 1.2;
    box-shadow: var(--shadow-sm);
    transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.blog-sort-select {
    padding: 5px 28px 5px 12px;
    cursor: pointer;
}

#article-search {
    width: 100%;
    height: 32px;
    padding: 0 12px 0 34px;
}

.blog-sort-select:hover,
#article-search:hover {
    border-color: var(--accent-border);
    color: var(--text);
    box-shadow: var(--shadow-md);
}

.blog-sort-select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent-border);
    color: var(--text);
}

.blog-sort-caret {
    position: absolute;
    right: 11px;
    width: 9px;
    height: 6px;
    color: var(--muted);
    pointer-events: none;
    transition: color 180ms ease;
}

.blog-sort-select:hover + .blog-sort-caret,
.blog-sort-select:focus-visible + .blog-sort-caret {
    color: var(--text);
}

.timeline-filter.blog-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11.5px;
}

.timeline-filter-label {
    color: var(--faint);
    font-size: 12px;
    font-weight: 450;
    margin-right: 2px;
}

.filter-chip {
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-2);
    border-radius: 999px;
    padding: 6px 13px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: var(--shadow-sm);
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
    user-select: none;
    -webkit-user-select: none;
}

.filter-chip:hover {
    border-color: var(--accent-border);
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.filter-chip.is-active {
    border-color: var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent);
    box-shadow: 0 2px 10px var(--accent-soft);
}

.filter-chip.is-empty {
    opacity: 0.45;
}

.filter-chip-profile[data-profile="mediumatch"].is-active {
    border-color: rgba(139, 92, 246, 0.45);
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.15);
}

.filter-chip-profile[data-profile="mediumatch"].is-active .filter-count {
    color: #a78bfa;
}

:is(html.light, body.light) .filter-chip-profile[data-profile="mediumatch"].is-active {
    border-color: rgba(124, 58, 237, 0.4);
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.12);
}

:is(html.light, body.light) .filter-chip-profile[data-profile="mediumatch"].is-active .filter-count {
    color: #7c3aed;
}

.filter-chip-profile[data-profile="octoparse"].is-active {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.15);
}

.filter-chip-profile[data-profile="octoparse"].is-active .filter-count {
    color: #3b82f6;
}

:is(html.light, body.light) .filter-chip-profile[data-profile="octoparse"].is-active {
    border-color: rgba(37, 99, 235, 0.4);
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.12);
}

:is(html.light, body.light) .filter-chip-profile[data-profile="octoparse"].is-active .filter-count {
    color: #2563eb;
}

.filter-chip-profile[data-profile="chat4data"].is-active {
    border-color: rgba(251, 146, 60, 0.45);
    background: rgba(251, 146, 60, 0.12);
    color: #fb923c;
    box-shadow: 0 2px 10px rgba(251, 146, 60, 0.15);
}

.filter-chip-profile[data-profile="chat4data"].is-active .filter-count {
    color: #fb923c;
}

:is(html.light, body.light) .filter-chip-profile[data-profile="chat4data"].is-active {
    border-color: rgba(234, 88, 12, 0.4);
    background: rgba(234, 88, 12, 0.1);
    color: #b45309;
    box-shadow: 0 2px 10px rgba(234, 88, 12, 0.12);
}

:is(html.light, body.light) .filter-chip-profile[data-profile="chat4data"].is-active .filter-count {
    color: #b45309;
}

.filter-count {
    min-width: 2ch;
    font-variant-numeric: tabular-nums;
    color: var(--faint);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 10.5px;
    font-weight: 500;
    pointer-events: none;
}

.filter-chip.is-active .filter-count {
    color: var(--accent);
}

/* Keep filtering and visiting a publisher in one compact control. */
.blog-filter-profiles .author-publications {
    margin-top: 0;
    gap: 8px;
}

.profile-control {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-soft);
}

.profile-control:has(.is-active) {
    border-color: var(--accent-border);
    background: var(--accent-soft);
}

.profile-control .filter-chip {
    border: 0;
    border-radius: 999px 0 0 999px;
    padding: 8px 8px 8px 10px;
    gap: 6px;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.profile-control .pub-ext-name {
    color: inherit;
    font-size: inherit;
}

.profile-control .filter-chip:only-child {
    border-radius: inherit;
    padding-right: 10px;
}

.profile-control .pub-ext-link {
    justify-content: center;
    width: 32px;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0 999px 999px 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.profile-control .pub-ext-link:hover {
    background: var(--accent-soft);
}

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

/* Native customizable picker preserves keyboard and touch behavior. */
@supports (appearance: base-select) {
    .blog-sort-select,
    .blog-sort-select::picker(select) {
        appearance: base-select;
    }

    .blog-sort-select {
        min-width: 120px;
        padding: 8px 30px 8px 13px;
    }

    .blog-sort-select::picker-icon {
        display: none;
    }

    .blog-sort-select::picker(select) {
        margin-top: 6px;
        padding: 5px;
        min-width: 160px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--bg-card);
        color: var(--text-2);
        box-shadow: var(--shadow-md);
        font: inherit;
    }

    .blog-sort-select option {
        gap: 10px;
        padding: 10px 12px;
        border-radius: 9px;
        font-size: 12.5px;
        cursor: pointer;
    }

    .blog-sort-select option:checked {
        background: var(--accent-soft);
        color: var(--accent);
    }

    .blog-sort-select option:is(:hover, :focus-visible) {
        background: var(--bg-soft);
        color: var(--text);
        outline: none;
    }

    .blog-sort-select option::checkmark {
        color: var(--accent);
    }
}

/* Empty State Card */
.blog-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 20px;
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    margin: 12px 0;
}

.blog-empty-icon {
    color: var(--muted);
    margin-bottom: 12px;
}

.blog-empty-title {
    font-size: 17px;
    font-weight: 550;
    color: var(--text);
    margin-bottom: 6px;
}

.blog-empty-desc {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 16px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.blog-empty-reset {
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease, color 180ms ease;
}

.blog-empty-reset:hover {
    background: var(--accent);
    color: var(--bg);
    transform: translateY(-1px);
}

/* Keep the visible filters in place when the result list gets shorter. */
.blog-results {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.blog-results .footer {
    margin-top: auto;
}

/* Unified Articles Grid (Matching Writing Section, Image 3) */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-bottom: 64px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    padding: 20px;
    min-height: 120px;
    box-shadow: var(--shadow-sm);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, box-shadow 220ms ease;
    text-decoration: none;
    color: inherit;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.blog-card[hidden],
.blog-card.is-hidden {
    display: none !important;
}

.blog-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-border);
    box-shadow: var(--shadow-lg);
}

.blog-card:hover .blog-card-title {
    color: var(--accent);
}

/* Publisher-Specific Hover Styles:
   Octoparse -> Brand Blue (#3b82f6 / #2563eb)
   Chat4Data -> Single Orange
   Medium    -> Pure White (Dark) / Pure Black (Light)
*/

/* Octoparse */
.blog-card[data-publisher="octoparse"]:hover,
.blog-card:has(.pub-octoparse):hover {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 14px 34px -4px rgba(59, 130, 246, 0.16), var(--shadow-md);
}

.blog-card[data-publisher="octoparse"]:hover .blog-card-title,
.blog-card:has(.pub-octoparse):hover .blog-card-title {
    color: #3b82f6;
}

:is(html.light, body.light) .blog-card[data-publisher="octoparse"]:hover,
:is(html.light, body.light) .blog-card:has(.pub-octoparse):hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 14px 34px -4px rgba(37, 99, 235, 0.12), var(--shadow-md);
}

:is(html.light, body.light) .blog-card[data-publisher="octoparse"]:hover .blog-card-title,
:is(html.light, body.light) .blog-card:has(.pub-octoparse):hover .blog-card-title {
    color: #2563eb;
}

/* Chat4Data (Single Orange) */
.blog-card[data-publisher="chat4data"]:hover,
.blog-card:has(.pub-chat4data):hover {
    border-color: rgba(251, 146, 60, 0.45);
    box-shadow: 0 14px 34px -4px rgba(251, 146, 60, 0.16), var(--shadow-md);
}

.blog-card[data-publisher="chat4data"]:hover .blog-card-title,
.blog-card:has(.pub-chat4data):hover .blog-card-title {
    color: #fb923c;
}

:is(html.light, body.light) .blog-card[data-publisher="chat4data"]:hover,
:is(html.light, body.light) .blog-card:has(.pub-chat4data):hover {
    border-color: rgba(234, 88, 12, 0.35);
    box-shadow: 0 14px 34px -4px rgba(234, 88, 12, 0.12), var(--shadow-md);
}

:is(html.light, body.light) .blog-card[data-publisher="chat4data"]:hover .blog-card-title,
:is(html.light, body.light) .blog-card:has(.pub-chat4data):hover .blog-card-title {
    color: #b45309;
}

/* Medium (Monochrome Black / White) */
.blog-card[data-publisher="medium"]:hover,
.blog-card:has(.pub-medium):hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 14px 34px -4px rgba(255, 255, 255, 0.08), var(--shadow-md);
}

.blog-card[data-publisher="medium"]:hover .blog-card-title,
.blog-card:has(.pub-medium):hover .blog-card-title {
    color: #ffffff;
}

:is(html.light, body.light) .blog-card[data-publisher="medium"]:hover,
:is(html.light, body.light) .blog-card:has(.pub-medium):hover {
    border-color: rgba(24, 24, 27, 0.45);
    box-shadow: 0 14px 34px -4px rgba(24, 24, 27, 0.1), var(--shadow-md);
}

:is(html.light, body.light) .blog-card[data-publisher="medium"]:hover .blog-card-title,
:is(html.light, body.light) .blog-card:has(.pub-medium):hover .blog-card-title {
    color: #09090b;
}

.blog-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
    letter-spacing: 0.4px;
}

.blog-card-date {
    color: var(--faint);
    font-weight: 450;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.blog-card-title {
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.38;
    font-weight: 500;
    letter-spacing: -0.012em;
    transition: color 200ms ease;
}

.blog-card-desc {
    color: var(--muted);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.55;
    letter-spacing: -0.006em;
    margin-top: 8px;
}

/* Publisher Sources (Clean Editorial Typography):
   Octoparse: brand blue (#3b82f6 / #2563eb)
   Chat4Data: slate grey
   Medium: pure black / white
*/
.pub-badge {
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Octoparse blue */
.pub-badge.pub-octoparse,
.blog-card .pub-badge.pub-octoparse {
    color: #3b82f6;
    background: none;
    border: none;
}

:is(html.light, body.light) .pub-badge.pub-octoparse,
:is(html.light, body.light) .blog-card .pub-badge.pub-octoparse {
    color: #2563eb;
}

/* Chat4Data: grey first part, orange second part */
.pub-badge.pub-chat4data {
    color: #94a3b8;
    background: none;
    border: none;
}

:is(html.light, body.light) .pub-badge.pub-chat4data {
    color: #475569;
}

.pub-badge.pub-chat4data .pub-accent {
    color: #fb923c;
    transition: color 200ms ease;
}

:is(html.light, body.light) .pub-badge.pub-chat4data .pub-accent {
    color: #b45309;
}

/* Medium black / white */
.pub-badge.pub-medium {
    color: var(--text-2);
    background: none;
    border: none;
}

:is(html.light, body.light) .pub-badge.pub-medium {
    color: #18181b;
}

/* Responsive Breakpoints */
@media (max-width: 760px) {
    #article-search {
        height: 40px;
        font-size: 16px;
    }

    h1 {
        font-size: 34px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 48px;
    }

    .filter-chip {
        font-size: 12px;
        padding: 5px 11px;
        min-height: 32px;
    }

    /* Narrow: label stacks above its row */
    .blog-filter-section {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 8px;
    }

    .blog-filter-topics .blog-filter-label,
    .blog-sort-label {
        margin-top: 8px;
    }
}

.blog-card[data-publisher="mediumatch"],
.pub-mediumatch {
    --mediumatch-violet: #a78bfa;
}

:is(html.light, body.light) .blog-card[data-publisher="mediumatch"],
:is(html.light, body.light) .pub-mediumatch {
    --mediumatch-violet: #7c3aed;
}

.pub-badge.pub-mediumatch,
.blog-card[data-publisher="mediumatch"]:is(:hover, :focus-visible) .blog-card-title {
    color: var(--mediumatch-violet);
}

.blog-card[data-publisher="mediumatch"]:is(:hover, :focus-visible) {
    border-color: color-mix(in srgb, var(--mediumatch-violet) 45%, transparent);
    box-shadow: 0 14px 34px -4px color-mix(in srgb, var(--mediumatch-violet) 16%, transparent), var(--shadow-md);
}

@media (max-width: 520px) {
    .hero p {
        font-size: 15px;
    }

    .timeline-filter.blog-filter {
        gap: 8px;
    }
}

/* Blog Pagination */
.blog-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-btn,
.pagination-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    min-width: 36px;
    padding: 0 12px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 180ms ease;
    user-select: none;
    -webkit-user-select: none;
}

.pagination-btn:hover:not(:disabled),
.pagination-num:hover:not(.is-active) {
    border-color: var(--border-hover);
    background: var(--bg-card);
    color: var(--text);
    transform: translateY(-1px);
}

.pagination-num.is-active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    font-weight: 600;
    cursor: default;
}

:is(html.light, body.light) .pagination-num.is-active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    color: var(--faint);
    font-size: 13px;
    user-select: none;
}

.pagination-info {
    margin: 16px 0 48px;
    text-align: center;
    font-size: 12px;
    color: var(--faint);
    font-weight: 450;
    letter-spacing: -0.006em;
}

@media (max-width: 520px) {
    .pagination-btn,
    .pagination-num {
        min-height: 38px;
        min-width: 38px;
        padding: 0 10px;
        font-size: 12.5px;
    }

    .pagination-btn span {
        display: none;
    }

    .pagination-btn {
        padding: 0 12px;
    }
}
