/* ============================================
   BASE.CSS — Core styles for kanapy-do-salonu.pl
   Design: PenNews Times Magazine replica
   Prefix: stb-
   Author: Damian Zięba <biuro@semtak.pl>
   ============================================ */

/* ── 1. Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: var(--body-size);
    line-height: var(--body-lh);
    color: var(--text-primary);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text-primary); text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; width: 100%; }
figure { margin: 0; }

/* ── 2. Typography ────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}
h1 { font-size: var(--h1-size); }
h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
h4 { font-size: var(--h4-size); }
h5 { font-size: 16px; }
h6 { font-size: 14px; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 700; }
em, i { font-style: italic; }

/* ── 3. Container ─────────────────────────────── */
.stb-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ── 4. Layout (main + sidebar) ───────────────── */
.stb-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--gap);
    align-items: start;
}
.stb-layout-main { min-width: 0; }
.stb-layout-sidebar { min-width: 0; }

/* ── 5. Grid system ───────────────────────────── */
.stb-grid {
    display: grid;
    gap: 24px;
}
.stb-grid--2 { grid-template-columns: repeat(2, 1fr); }
.stb-grid--3 { grid-template-columns: repeat(3, 1fr); }
.stb-grid--4 { grid-template-columns: repeat(4, 1fr); }
.stb-grid--small { margin-top: 24px; }

/* ── 6. Section titles (Work Sans 18px 600 + 3px border-bottom #111) ── */
.stb-section-title {
    font-family: var(--font-menu);
    font-size: 18px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--text-primary);
    position: relative;
    color: var(--text-primary);
    line-height: 1.3;
}
.stb-section-title--bold {
    /* inherits from .stb-section-title */
}
.stb-section-title--serif {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: none;
    text-align: center;
    margin-bottom: 12px;
}
.stb-section-title--light { color: #fff; border-bottom-color: rgba(255,255,255,0.2); }

/* ── 7. Sections ──────────────────────────────── */
.stb-section { padding: 40px 0; }
.stb-section--gray { background: var(--bg-surface); }
.stb-section--dark { background: var(--bg-dark); color: #fff; }
.stb-section--dark .stb-card-title a { color: #fff; }
.stb-section--dark .stb-meta { color: rgba(255,255,255,0.6); }
.stb-section--dark .stb-section-title { color: #fff; border-bottom-color: rgba(255,255,255,0.2); }
.stb-section--white { background: var(--bg-white); }

/* ── 8. Cards ─────────────────────────────────── */
.stb-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-white);
}
.stb-card-thumb {
    display: block;
    overflow: hidden;
    position: relative;
}
.stb-card-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 370 / 250;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.stb-card:hover .stb-card-thumb img {
    opacity: 0.85;
    transform: scale(1.02);
}
.stb-card-body { padding: 14px 0; }
.stb-card-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}
.stb-card-title a:hover { color: var(--text-primary); text-decoration: underline; }
.stb-card--large .stb-card-title { font-size: 22px; }
.stb-card-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}
.stb-card-no-thumb {
    background: var(--bg-surface);
    aspect-ratio: 370/250;
}

/* Card with white bg body (inside gray sections) */
.stb-card--padded .stb-card-body {
    padding: 14px 16px;
}

/* Card overlay (gradient overlay on image) */
.stb-card--overlay { position: relative; }
.stb-card--overlay .stb-card-thumb { position: relative; }
.stb-card--overlay .stb-card-thumb img {
    aspect-ratio: 370/250;
    object-fit: cover;
}
.stb-card-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.stb-card--overlay .stb-card-title { color: #fff; font-size: 16px; margin-bottom: 4px; }
.stb-card--overlay .stb-card-title a { color: #fff; }
.stb-card--overlay .stb-card-title a:hover { color: var(--text-primary); text-decoration: underline; }
.stb-card--overlay .stb-meta { color: rgba(255,255,255,0.6); }
.stb-card--overlay .stb-cat-badge { margin-bottom: 6px; }

/* ── 9. Category badge (dark bg like PenNews) ── */
.stb-cat-badge {
    display: inline-block;
    background: var(--text-primary);
    color: #fff;
    font-family: var(--font-menu);
    font-size: 10px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    padding: 0 5px;
    margin-bottom: 8px;
    line-height: 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}
.stb-cat-badge:hover { background: var(--accent); color: #fff; }
.stb-cat-badge--small { font-size: 9px; padding: 0 5px; }
.stb-cat-badge--accent { background: var(--accent); }

/* ── 10. Meta ─────────────────────────────────── */
.stb-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--meta-size);
    color: var(--text-meta);
    flex-wrap: wrap;
}
.stb-meta svg { vertical-align: -2px; margin-right: 3px; }
.stb-meta span { display: inline-flex; align-items: center; }
.stb-meta a { color: var(--text-meta); }
.stb-meta a:hover { color: var(--accent); }
.stb-meta-sep {
    display: inline-block;
    width: 3px;
    height: 3px;
    background: var(--text-meta);
    border-radius: 50%;
}

/* ── 11. Sidebar ──────────────────────────────── */
.stb-sidebar { position: static; }

.stb-widget { margin-bottom: 32px; }
.stb-widget:last-child { margin-bottom: 0; }
.stb-widget-title {
    font-family: var(--font-menu);
    font-size: 18px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 3px solid var(--text-primary);
    position: relative;
    color: var(--text-primary);
}

/* Sidebar tabs (Najnowsze / Popularne) */
.stb-tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.stb-tab-nav li { flex: 1; }
.stb-tab-nav a {
    display: block;
    text-align: center;
    padding: 10px 16px;
    font-family: var(--font-menu);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    min-height: 44px;
    line-height: 24px;
}
.stb-tab-nav a:hover { color: var(--text-primary); }
.stb-tab-nav a.stb-tab-active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.stb-tab-content { display: none; }
.stb-tab-content.stb-tab-active { display: block; }

/* Sidebar posts */
.stb-sidebar-post {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.stb-sidebar-post:first-child { padding-top: 0; }
.stb-sidebar-post:last-child { border-bottom: none; }
.stb-sidebar-post-thumb {
    flex-shrink: 0;
    width: 94px;
    height: 70px;
    overflow: hidden;
}
.stb-sidebar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.stb-sidebar-post-body { flex: 1; min-width: 0; }
.stb-sidebar-post-meta {
    font-size: 11px;
    color: var(--text-meta);
    margin-bottom: 4px;
}
.stb-sidebar-post-meta a { color: var(--accent); }
.stb-sidebar-post-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}
.stb-sidebar-post-title a:hover { color: var(--text-primary); text-decoration: underline; }

/* Sidebar categories */
.stb-category-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.stb-category-list li:last-child { border-bottom: none; }
.stb-category-list a {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}
.stb-category-list a:hover { color: var(--accent); }
.stb-cat-count {
    color: var(--text-meta);
    font-size: 12px;
}

/* ── 12. Breadcrumbs bar ──────────────────────── */
.stb-breadcrumbs-bar {
    background: var(--bg-surface);
    padding: 12px 0;
    margin-bottom: 5px;
}
.stb-breadcrumbs {
    font-size: 12px;
    color: var(--text-secondary);
}
.stb-breadcrumbs a { color: var(--text-secondary); }
.stb-breadcrumbs a:hover { color: var(--accent); }
.stb-breadcrumb-sep { margin: 0 6px; }
.stb-breadcrumb-current { color: var(--text-primary); }

/* ── 13. Archive header (dark bg) ─────────────── */
.stb-archive-header {
    background: var(--bg-dark);
    color: #fff;
    padding: 32px 0;
    margin-bottom: 32px;
}
.stb-archive-header .stb-breadcrumbs,
.stb-archive-header .stb-breadcrumbs a { color: rgba(255,255,255,0.6); }
.stb-archive-header .stb-breadcrumb-current { color: #fff; }
.stb-archive-title {
    font-size: 32px;
    margin-top: 12px;
    color: #fff;
}
.stb-archive-desc {
    color: rgba(255,255,255,0.7);
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
}

/* ── 14. Pagination ───────────────────────────── */
.stb-pagination {
    margin: 48px 0 24px;
    text-align: center;
}
.stb-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.stb-pagination a,
.stb-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    transition: var(--transition);
}
.stb-pagination .current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.stb-pagination a:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}
.stb-pagination .dots {
    border: none;
    background: none;
    color: var(--text-meta);
}

/* ── 15. Single article ───────────────────────── */
.stb-single-article { margin-bottom: 48px; }
.stb-article-header { margin-bottom: 24px; }
.stb-article-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin: 8px 0 16px;
}
.stb-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-meta);
}
.stb-article-meta a { color: var(--text-meta); }
.stb-article-meta a:hover { color: var(--accent); }
.stb-article-meta img {
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}
.stb-article-featured { margin-bottom: 24px; }
.stb-article-featured img {
    width: 100%;
    aspect-ratio: 770 / 515;
    object-fit: cover;
}

/* Article content typography */
.stb-article-content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-primary);
}
.stb-article-content p { margin-bottom: 1.25em; }
.stb-article-content h2 { margin: 2em 0 0.75em; font-size: 24px; }
.stb-article-content h3 { margin: 1.5em 0 0.5em; font-size: 20px; }
.stb-article-content h4 { margin: 1.25em 0 0.5em; font-size: 18px; }
.stb-article-content img { margin: 1.5em 0; }
.stb-article-content a { color: var(--accent); text-decoration: underline; }
.stb-article-content a:hover { color: var(--accent-hover); }
.stb-article-content ul,
.stb-article-content ol {
    margin: 1em 0;
    padding-left: 1.5em;
}
.stb-article-content ul { list-style: disc; }
.stb-article-content ol { list-style: decimal; }
.stb-article-content li { margin-bottom: 0.5em; }
.stb-article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 16px 24px;
    margin: 1.5em 0;
    background: var(--bg-surface);
    font-style: italic;
    color: var(--text-secondary);
}
.stb-article-content blockquote p:last-child { margin-bottom: 0; }
.stb-article-content table {
    margin: 1.5em 0;
    border: 1px solid var(--border-color);
}
.stb-article-content th,
.stb-article-content td {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    text-align: left;
    font-size: 14px;
}
.stb-article-content th {
    background: var(--bg-surface);
    font-weight: 700;
}
.stb-article-content pre {
    background: var(--bg-dark);
    color: #e0e0e0;
    padding: 20px;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 13px;
    line-height: 1.6;
}
.stb-article-content code {
    background: var(--bg-surface);
    padding: 2px 6px;
    font-size: 0.9em;
}
.stb-article-content pre code {
    background: none;
    padding: 0;
}
.stb-article-content .wp-caption {
    max-width: 100%;
    margin: 1.5em 0;
}
.stb-article-content .wp-caption-text {
    font-size: 12px;
    color: var(--text-meta);
    padding: 8px 0;
    text-align: center;
}

/* Tags */
.stb-article-tags {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}
.stb-tags-label {
    font-weight: 700;
    margin-right: 8px;
    font-size: 14px;
}
.stb-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    background: var(--bg-surface);
    margin: 4px 4px 4px 0;
    transition: var(--transition);
    border-radius: var(--radius);
}
.stb-tag:hover { background: var(--accent); color: #fff; }

/* TOC */
.stb-toc {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 20px 24px;
    margin-bottom: 24px;
    border-radius: var(--radius);
}
.stb-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stb-toc-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    font-family: var(--font-heading);
}
.stb-toc-toggle {
    font-size: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}
.stb-toc-list {
    margin-top: 12px;
    padding-left: 20px;
    list-style: decimal;
}
.stb-toc-list li { padding: 4px 0; font-size: 14px; }
.stb-toc-list a { color: var(--text-primary); }
.stb-toc-list a:hover { color: var(--accent); }
.stb-toc-sub { padding-left: 20px; list-style: lower-alpha; }

/* Related posts */
.stb-related {
    padding-top: 32px;
    margin-top: 32px;
    border-top: 1px solid var(--border-color);
    margin-bottom: 32px;
}
.stb-related .stb-section-title { margin-bottom: 20px; }

/* Author box */
.stb-author-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-surface);
    margin-top: 32px;
}
.stb-author-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 50%;
}
.stb-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.stb-author-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}
.stb-author-bio {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── 16. Buttons ──────────────────────────────── */
.stb-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #000;
    color: #fff;
    font-family: var(--font-menu);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius);
    transition: var(--transition);
    min-height: 44px;
    line-height: 20px;
    text-align: center;
}
.stb-btn:hover { background: var(--accent); color: #fff; }
.stb-btn--primary { background: var(--accent); }
.stb-btn--primary:hover { background: var(--accent-hover); }
.stb-btn--outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.stb-btn--outline:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── 17. Read more (black button like PenNews) ── */
.stb-read-more {
    font-family: var(--font-menu);
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #fff;
    background: #000;
    padding: 6px 18px;
    display: inline-block;
    border-radius: var(--radius);
    transition: var(--transition);
    min-height: 44px;
    line-height: 32px;
}
.stb-read-more:hover { background: var(--accent); color: #fff; }

/* ── 18. Search form ──────────────────────────── */
.stb-search-form {
    display: flex;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
}
.stb-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-right: none;
    font-size: 14px;
    outline: none;
    background: var(--bg-white);
    border-radius: var(--radius);
    min-height: 44px;
    transition: var(--transition);
}
.stb-search-input:focus { border-color: var(--accent); }
.stb-search-btn {
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-menu);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius);
    min-height: 44px;
    transition: var(--transition);
}
.stb-search-btn:hover { background: var(--accent-hover); }

/* Sidebar search */
.stb-widget .stb-search-form { max-width: 100%; }

/* ── 19. Contact form ─────────────────────────── */
.stb-contact-form { max-width: 600px; margin-top: 32px; }
.stb-form-group { margin-bottom: 20px; }
.stb-form-group label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
}
.stb-form-group input,
.stb-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    outline: none;
    background: var(--bg-white);
    border-radius: var(--radius);
    min-height: 44px;
    transition: var(--transition);
}
.stb-form-group textarea { min-height: 150px; resize: vertical; }
.stb-form-group input:focus,
.stb-form-group textarea:focus { border-color: var(--accent); }
.stb-form-status { margin-top: 16px; font-size: 14px; }
.stb-form-success { color: #155724; }
.stb-form-error { color: #721c24; }
/* Honeypot */
.stb-hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ── 20. Subscribe widget ─────────────────────── */
.stb-subscribe-widget {
    background: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius);
}
.stb-subscribe-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}
.stb-subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stb-subscribe-input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    outline: none;
    width: 100%;
    background: var(--bg-white);
    min-height: 44px;
    transition: var(--transition);
}
.stb-subscribe-input:focus { border-color: var(--accent); }

/* ── 21. Load more wrap ───────────────────────── */
.stb-load-more-wrap {
    text-align: center;
    margin-top: 32px;
}

/* ── 22. CB containers (Content Bridge) ───────── */
.stb-cb-billboard { padding: 24px 0; }
.stb-cb-inline { margin: 24px 0; }
.stb-widget-cb { margin: 24px 0; }

/* ── 23. No results ───────────────────────────── */
.stb-no-results {
    text-align: center;
    padding: 48px 20px;
}
.stb-no-results-title {
    margin-bottom: 16px;
    font-size: 24px;
}
.stb-no-results p {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 15px;
}
.stb-no-results .stb-search-form { margin-top: 24px; }

/* ── 24. 404 page ─────────────────────────────── */
.stb-404 {
    text-align: center;
    padding: 80px 20px;
}
.stb-404-title {
    font-size: 96px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 16px;
    font-family: var(--font-heading);
    line-height: 1;
}
.stb-404-heading {
    font-size: 28px;
    margin-bottom: 16px;
}
.stb-404-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}
.stb-404 .stb-search-form { margin-top: 32px; }
.stb-404 .stb-btn { margin-top: 24px; }

/* ── Page template ────────────────────────────── */
.stb-page-article { margin-bottom: 48px; }
.stb-page-title {
    margin-bottom: 24px;
    font-size: 32px;
}
.stb-page-content {
    font-size: 16px;
    line-height: 1.75;
}
.stb-page-content p { margin-bottom: 1.25em; }
.stb-page-content a { color: var(--accent); text-decoration: underline; }
.stb-page-content a:hover { color: var(--accent-hover); }
.stb-page-content img { margin: 1.5em 0; }
.stb-page-content ul,
.stb-page-content ol {
    margin: 1em 0;
    padding-left: 1.5em;
}
.stb-page-content ul { list-style: disc; }
.stb-page-content ol { list-style: decimal; }
.stb-page-content li { margin-bottom: 0.5em; }

/* ── Utility classes ──────────────────────────── */
.stb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.stb-text-center { text-align: center; }
.stb-mb-0 { margin-bottom: 0; }

/* ── 25. Responsive ───────────────────────────── */

/* --- Tablet landscape / small desktop --- */
@media (max-width: 1024px) {
    .stb-layout {
        grid-template-columns: 1fr;
    }
    .stb-layout-sidebar { margin-top: 32px; }
    .stb-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* --- Tablet portrait --- */
@media (max-width: 768px) {
    :root {
        --container-padding: 16px;
        --h1-size: 28px;
        --h2-size: 22px;
        --h3-size: 18px;
    }
    .stb-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .stb-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .stb-article-title { font-size: 24px; }
    .stb-archive-title { font-size: 24px; }
    .stb-section { padding: 32px 0; }
    .stb-section-title { font-size: 16px; margin-bottom: 20px; }
    .stb-pagination { margin: 32px 0 16px; }
    .stb-related .stb-grid { gap: 16px; }

    /* Author box stacked */
    .stb-author-box { flex-direction: column; align-items: center; text-align: center; }
}

/* --- Mobile --- */
@media (max-width: 480px) {
    .stb-grid--2,
    .stb-grid--3 { grid-template-columns: 1fr; }
    .stb-grid--4 { grid-template-columns: 1fr; }
    .stb-404-title { font-size: 64px; }
    .stb-404-heading { font-size: 22px; }
    .stb-article-title { font-size: 22px; }
    .stb-page-title { font-size: 24px; }
    .stb-card--large .stb-card-title { font-size: 18px; }
    .stb-search-form { flex-direction: column; }
    .stb-search-input { border-right: 1px solid var(--border-color); }
    .stb-search-btn { width: 100%; }
    .stb-contact-form { margin-top: 24px; }
    .stb-toc { padding: 16px; }
}
