/* Blog index: article browsing toolbar and popular tags.
 * Replaces the removed three topic cards; category/tag archive styles stay separate.
 */
.ytk-blog-index-content {
    padding: 60px 0 96px;
    background: #f5f7fa;
}

.ytk-blog-index-content-inner {
    width: calc(100% - var(--ytk-layout-cut));
    max-width: var(--ytk-layout-max);
    margin: 0 auto;
}

.ytk-blog-article-toolbar { margin-bottom: 40px; }
/* This is a scroll target, not an interactive control. */
.ytk-blog-article-toolbar:focus { outline: none; }
.ytk-blog-article-toolbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    padding-bottom: 26px;
    border-bottom: 1px solid #e1e6ec;
}

.ytk-blog-article-toolbar h2 {
    margin: 0;
    color: var(--ytk-ink);
    font-size: var(--ytk-blog-heading-size);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
}

.ytk-blog-article-controls { display: flex; align-items: center; gap: 18px; min-width: 0; }
.ytk-blog-category-picker { position: relative; width: 248px; flex-shrink: 0; }
.ytk-blog-category-picker summary {
    box-sizing: border-box;
    min-height: 58px;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    list-style: none;
    border: 1px solid #dfe5ec;
    border-radius: 999px;
    background: #ffffff;
    color: var(--ytk-ink);
    font-size: 16px;
    line-height: 1.3;
    font-weight: 650;
    cursor: pointer;
}
.ytk-blog-category-picker summary::-webkit-details-marker { display: none; }
.ytk-blog-category-picker summary .ytk-icon { font-size: 20px; flex-shrink: 0; }
.ytk-blog-category-picker[open] summary { border-color: #8ca0bb; }
.ytk-blog-category-options {
    position: absolute;
    z-index: 5;
    top: calc(100% + 10px);
    right: 0;
    min-width: 260px;
    max-width: min(340px, 90vw);
    padding: 8px;
    border: 1px solid #dfe5ec;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(var(--ytk-ink-rgb), .10);
}
.ytk-blog-category-options a {
    display: block;
    padding: 12px 14px;
    border-radius: 9px;
    color: var(--ytk-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}
.ytk-blog-category-options a:hover,
.ytk-blog-category-options a[aria-current] { background: #eef3f8; color: var(--ytk-ink); }

.ytk-blog-article-search {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 360px;
    min-height: 58px;
    margin: 0;
    padding: 0 12px 0 22px;
    border: 1px solid #dfe5ec;
    border-radius: 999px;
    background: #ffffff;
}
.ytk-blog-article-search input[type="search"] {
    width: 100%;
    min-width: 0;
    height: 56px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ytk-ink);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 650;
    outline: none;
    box-shadow: none;
}
.ytk-blog-article-search input::placeholder { color: var(--ytk-ink); opacity: 1; }
.ytk-blog-article-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ytk-ink);
    cursor: pointer;
}
.ytk-blog-article-search button .ytk-icon { font-size: 21px; }
.ytk-blog-article-search button:hover { background: #eef3f8; }
.ytk-blog-article-search:focus-within,
.ytk-blog-category-picker summary:focus-visible { outline: 2px solid #8ca0bb; outline-offset: 3px; }
.ytk-blog-category-options a:focus-visible,
.ytk-blog-popular-tags a:focus-visible,
.ytk-blog-filter-status a:focus-visible,
.ytk-blog-article-search button:focus-visible { outline: 2px solid #8ca0bb; outline-offset: 2px; }

.ytk-blog-popular-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 24px;
}
.ytk-blog-popular-tags strong { margin-right: 12px; color: var(--ytk-ink); font-size: 18px; font-weight: 800; }
.ytk-blog-popular-tags a {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 7px 13px;
    border: 1px solid #dfe5ec;
    border-radius: 5px;
    background: transparent;
    color: #63687a;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
}
.ytk-blog-popular-tags a:hover,
.ytk-blog-popular-tags a[aria-current] { background: #ffffff; border-color: #8ca0bb; color: var(--ytk-ink); }
.ytk-blog-filter-status { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 20px; color: #63687a; font-size: 14px; }
.ytk-blog-filter-status a { color: var(--ytk-ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1100px) {
    .ytk-blog-article-toolbar-top { align-items: flex-start; flex-direction: column; gap: 20px; }
    .ytk-blog-article-controls { width: 100%; }
    .ytk-blog-article-search { flex: 1; }
}

@media (max-width: 820px) {
    .ytk-blog-article-toolbar h2 { font-size: var(--ytk-blog-heading-size); }
}

@media (max-width: 680px) {
    .ytk-blog-index-content { padding: 36px 0 72px; }
    .ytk-blog-article-toolbar { margin-bottom: 24px; }
    .ytk-blog-article-toolbar-top { padding-bottom: 20px; }
    .ytk-blog-article-controls { flex-wrap: wrap; gap: 12px; }
    .ytk-blog-category-picker { width: 100%; }
    .ytk-blog-category-options { left: 0; right: 0; min-width: 0; max-width: none; }
    .ytk-blog-article-search { flex-basis: 100%; width: 100%; }
    .ytk-blog-popular-tags { gap: 8px; padding-top: 20px; }
    .ytk-blog-popular-tags strong { width: 100%; margin: 0 0 4px; }
    .ytk-blog-popular-tags a { font-size: 14px; padding: 7px 11px; }
}
