:root {
    --bg: #fbfaf7;
    --text: #1f2933;
    --muted: #5b6470;
    --card: #ffffff;
    --line: #e6e0d4;
    --accent: #1f6feb;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--accent); }

.site-header,
.site-footer,
.site-main {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
}

.brand {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.site-header nav a {
    color: var(--muted);
    text-decoration: none;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero {
    padding: 70px 0 40px;
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-weight: 700;
}

h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 7vw, 62px);
    line-height: 1.04;
}

h2 {
    margin-top: 0;
    font-size: 22px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.button-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--line);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    padding: 20px 0 60px;
}

.cards article,
.narrow {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
}

.category-link-panel { margin-bottom: 18px; }
.category-link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.category-link-grid a { display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fbfaf7; color: var(--text); text-decoration: none; }
.category-link-grid a:hover { border-color: var(--accent); background: #eef6ff; }
.category-link-grid span { color: var(--muted); font-size: 14px; line-height: 1.4; }

.site-footer {
    border-top: 1px solid var(--line);
    padding: 24px 0;
    color: var(--muted);
}

.compact { padding-top: 34px; }
.admin-body { background: #f7f8fb; }
.admin-header { border-bottom: 1px solid var(--line); }
.admin-main { padding-top: 28px; }
.admin-card { margin-top: 34px; }
.admin-panel { margin: 22px 0 60px; }
.admin-panel-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 14px; }
.admin-panel-header h2 { margin: 0; }
.metric { margin: 0; font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.wide-card { max-width: 920px; }
.admin-title-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 34px 0 18px; }
.small { color: var(--muted); font-size: 14px; }

.form-stack { display: grid; gap: 16px; }
.form-stack label { display: grid; gap: 6px; font-weight: 700; }
.post-editor-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}
.post-editor-form input,
.post-editor-form textarea,
.post-editor-form select,
.form-stack input,
.form-stack textarea,
.form-stack select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}
.checkbox-label { display: flex !important; align-items: center; grid-template-columns: auto 1fr; }
.checkbox-label input { width: auto; }
.checkbox-row { display: flex; gap: 16px; flex-wrap: wrap; }
.checkbox-row.stacked { align-items: flex-start; flex-direction: column; gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.filter-row { display: flex; align-items: end; gap: 12px; margin: 0 0 16px; }
.filter-row label { display: grid; gap: 6px; font-weight: 700; }
.filter-row select { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; }
.filter-row input { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; }
.status-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.status-filter a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: #fff; color: var(--text); font-weight: 700; text-decoration: none; }
.status-filter a.is-active { border-color: var(--accent); background: #eef6ff; color: var(--accent); }
.status-filter span { color: var(--muted); font-weight: 400; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.pagination a { border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; background: #fff; color: var(--text); font-weight: 700; text-decoration: none; }
.pagination a.is-active { border-color: var(--accent); background: #eef6ff; color: var(--accent); }
.redirect-inline-form { display: flex; align-items: center; gap: 8px; }
.redirect-inline-form input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }
.redirect-existing { display: grid; gap: 5px; justify-items: start; }
.admin-preview { margin: 0; max-width: 340px; }
.admin-preview img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.admin-preview figcaption { color: var(--muted); font-size: 14px; margin-top: 4px; }
.post-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.post-editor-main,
.post-editor-sidebar { display: grid; gap: 16px; }
.post-editor-sidebar { position: sticky; top: 16px; }
.editor-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 8px 24px rgba(31, 41, 51, .04); }
.editor-panel h2 { margin: 0 0 12px; font-size: 18px; }
.panel-heading { margin-bottom: 14px; }
.panel-heading p { margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.title-field input { font-size: 24px; font-weight: 700; line-height: 1.2; }
.permalink-preview { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; color: var(--muted); font-size: 14px; }
.permalink-preview code { color: #334155; word-break: break-word; }
.field-hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.field-hint.is-over-limit { color: #b42318; font-weight: 700; }
.field-warning { margin: 10px 0; border-left: 3px solid #f59e0b; background: #fffbeb; color: #92400e; padding: 9px 11px; border-radius: 8px; font-size: 14px; }
.editor-actions { display: grid; gap: 10px; }
.editor-actions .button { justify-content: center; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.ai-actions .button { min-height: 36px; padding: 7px 12px; font-size: 14px; }
.js-ai-result { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; }
.ai-article-form { max-width: 920px; margin-bottom: 42px; }
.media-top-grid { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
.media-upload-panel,
.remote-image-panel { margin-bottom: 0; }
.remote-results-panel { margin-bottom: 18px; }
.remote-image-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto; gap: 12px; align-items: end; }
.remote-image-search label { display: grid; gap: 6px; font-weight: 700; }
.remote-image-search input,
.remote-image-search select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; }
.remote-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 14px; }
.remote-image-card { background: #fbfaf7; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.remote-image-card img { width: 100%; height: 130px; object-fit: cover; border-radius: 11px; border: 1px solid var(--line); background: #fff; }
.remote-image-card h3 { margin: 10px 0 6px; font-size: 16px; line-height: 1.3; }
.remote-image-card .button { justify-content: center; min-height: 38px; padding: 8px 12px; }
.load-more-row { display: flex; justify-content: center; margin: 18px 0 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 36px; }
.media-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: 0 8px 24px rgba(31, 41, 51, .04); }
.media-card img { width: 100%; height: 110px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.media-preview-link { display: block; color: inherit; }
.media-preview-link:hover img { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.media-card h2 { margin: 10px 0 6px; font-size: 16px; word-break: break-word; }
.media-card input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; }
.media-file-icon { display: grid; place-items: center; height: 110px; border-radius: 12px; background: linear-gradient(135deg, #fee2e2, #fff7ed); color: #991b1b; font-weight: 800; letter-spacing: .08em; }
.media-edit-modal[hidden] { display: none; }
.media-edit-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 22px; }
.media-edit-dialog { position: relative; width: min(560px, 100%); max-height: calc(100vh - 44px); overflow: auto; background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 24px 80px rgba(15, 23, 42, .32); }
.linked-media-list { display: grid; gap: 10px; }
.linked-media-list > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fbfaf7; }
.linked-media-list input { margin-top: 6px; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; }
.media-picker-modal[hidden] { display: none; }
.media-picker-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 22px; }
.media-picker-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .62); }
.media-picker-dialog { position: relative; width: min(980px, 100%); max-height: min(820px, calc(100vh - 44px)); overflow: auto; display: grid; gap: 14px; background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 24px 80px rgba(15, 23, 42, .32); }
.media-picker-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.media-picker-header h2 { margin: 0; }
.media-picker-search { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; }
.media-picker-upload { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fbfaf7; }
.media-picker-upload h3 { margin: 0 0 10px; font-size: 16px; }
.media-picker-upload .button { margin-top: 10px; }
.media-picker-stock { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #f8fbff; }
.media-picker-stock h3 { margin: 0 0 10px; font-size: 16px; }
.media-picker-stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 10px; }
.media-picker-grid { overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding-right: 4px; }
.media-picker-item { display: grid; gap: 7px; align-content: start; border: 2px solid transparent; border-radius: 13px; padding: 8px; background: #fbfaf7; color: var(--text); cursor: pointer; font: inherit; text-align: left; }
.media-picker-item:hover,
.media-picker-item.is-selected { border-color: var(--accent); background: #eef6ff; }
.media-picker-item img { width: 100%; height: 105px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.media-picker-item span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; line-height: 1.3; }
.media-picker-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.internal-link-modal[hidden] { display: none; }
.internal-link-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 22px; }
.internal-link-dialog { position: relative; width: min(720px, 100%); max-height: calc(100vh - 44px); overflow: auto; display: grid; gap: 14px; background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 24px 80px rgba(15, 23, 42, .32); }
.internal-link-search { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; }
.internal-link-list { display: grid; gap: 10px; }
.internal-link-item { display: grid; gap: 4px; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px; background: #fbfaf7; color: var(--text); cursor: pointer; font: inherit; text-align: left; }
.internal-link-item:hover { border-color: var(--accent); background: #eef6ff; }
.internal-link-item code { color: var(--muted); font-size: 13px; }
.internal-link-item span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.fact-check-list { display: grid; gap: 12px; }
.fact-check-list article { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fbfaf7; }
.fact-check-list p { margin: 0 0 8px; }

.alert { border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.alert p { margin: 0; }
.alert-error { background: #ffeceb; color: #9f1c16; border: 1px solid #ffc9c5; }
.alert-success { background: #e9f8ef; color: #176c3a; border: 1px solid #b8ebca; }
.alert-info { background: #e7f3ff; color: #0f5aa3; border: 1px solid #b3d7ff; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.admin-list-card { box-shadow: 0 12px 30px rgba(31, 41, 51, .05); }
table { width: 100%; border-collapse: collapse; }
.admin-table { min-width: 780px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #fbfaf7; color: #3b4652; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; }
tbody tr:hover { background: #fcfdff; }
tr:last-child td { border-bottom: 0; }
.primary-cell { min-width: 220px; }
.primary-cell a { color: var(--text); text-decoration: none; }
.primary-cell a:hover { color: var(--accent); }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 5px; font-size: 13px; opacity: .84; }
.row-actions a { color: var(--accent); text-decoration: none; }
.actions-cell { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 24px; }
.table-actions { width: 140px; }
.table-actions a,
.table-actions button { font-size: 14px; }
.table-code { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; color: #475569; background: #f6f8fa; border: 1px solid #e6eaf0; border-radius: 7px; padding: 2px 6px; }
.table-url { display: inline-block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-cell { color: var(--muted); white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }
.status-published { background: #dcfce7; color: #166534; }
.status-draft { background: #fef3c7; color: #92400e; }
.status-archived { background: #e5e7eb; color: #374151; }
.status-warning { background: #ffedd5; color: #9a3412; }
.status-neutral { background: #e0f2fe; color: #075985; }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--accent); cursor: pointer; font: inherit; }
.danger-link { color: #b42318; }
.danger-button { color: #b42318; border-color: #fecaca; background: #fff7f7; }

hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

.article-page { max-width: 820px; margin: 42px auto 76px; }
.article-hero { margin-bottom: 28px; }
.article-page h1 { font-size: clamp(36px, 6vw, 58px); letter-spacing: -.03em; }
.article-meta { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.lead { color: var(--muted); font-size: clamp(19px, 3vw, 23px); line-height: 1.55; }
.article-content { font-size: 18px; line-height: 1.78; }
.article-content > * { margin-top: 0; margin-bottom: 22px; }
.article-content h2 { margin-top: 42px; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.02em; }
.article-content h3 { margin-top: 32px; font-size: 24px; }
.article-content img { max-width: 100%; height: auto; border-radius: 14px; }
.article-content figure { margin: 30px 0; }
.article-content figure.align-left,
.article-content img.align-left { float: left; max-width: 45%; margin: 6px 24px 16px 0; }
.article-content figure.align-right,
.article-content img.align-right { float: right; max-width: 45%; margin: 6px 0 16px 24px; }
.article-content figure.align-center,
.article-content img.align-center { display: block; margin-left: auto; margin-right: auto; }
.article-content figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; text-align: center; }
.article-content blockquote { margin: 30px 0; border-left: 4px solid var(--accent); background: #f3f7ff; padding: 18px 22px; border-radius: 0 14px 14px 0; color: #334155; }
.article-content code { background: #eef1f5; border-radius: 6px; padding: 2px 6px; font-size: .92em; }
.article-content pre { overflow-x: auto; background: #172033; color: #f8fafc; border-radius: 14px; padding: 18px; }
.article-content pre code { background: transparent; color: inherit; padding: 0; }
.article-content table { display: block; width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.article-content th { background: #f6f4ef; }
.article-content tr:nth-child(even) td { background: #fcfbf8; }
.featured-media { margin: 28px 0; }
.featured-image { width: 100%; height: auto; border-radius: 18px; }
.featured-media figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }
.article-gallery { margin: 48px 0 0; border-top: 1px solid var(--line); padding-top: 24px; }
.article-gallery-carousel { position: relative; }
.article-gallery-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 240px); gap: 14px; overflow-x: auto; padding: 2px 54px 14px; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.article-gallery-item { scroll-snap-align: start; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 16px; padding: 8px; background: #fff; color: var(--text); cursor: pointer; font: inherit; text-align: left; box-shadow: 0 8px 22px rgba(31, 41, 51, .05); }
.article-gallery-item:hover { border-color: var(--accent); }
.article-gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #eef2f7; }
.article-gallery-item span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); font-size: 13px; line-height: 1.3; }
.article-gallery-nav { position: absolute; top: 50%; z-index: 2; width: 42px; height: 42px; transform: translateY(-50%); border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--text); cursor: pointer; font-size: 30px; font-weight: 800; line-height: 1; box-shadow: 0 10px 28px rgba(31, 41, 51, .14); }
.article-gallery-nav:hover { border-color: var(--accent); color: var(--accent); }
.article-gallery-nav-prev { left: 4px; }
.article-gallery-nav-next { right: 4px; }
.article-lightbox[hidden] { display: none; }
.article-lightbox { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; background: rgba(10, 15, 25, .88); padding: 28px 64px; }
.article-lightbox figure { max-width: min(1100px, 100%); max-height: 100%; margin: 0; display: grid; gap: 10px; justify-items: center; }
.article-lightbox img { max-width: 100%; max-height: calc(100vh - 130px); border-radius: 14px; box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
.article-lightbox figcaption { color: #f8fafc; text-align: center; }
.article-lightbox-close,
.article-lightbox-prev,
.article-lightbox-next { position: fixed; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #111827; cursor: pointer; font: inherit; font-weight: 800; }
.article-lightbox-close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 30px; line-height: 1; }
.article-lightbox-prev,
.article-lightbox-next { top: 50%; width: 48px; height: 48px; transform: translateY(-50%); font-size: 34px; }
.article-lightbox-prev { left: 20px; }
.article-lightbox-next { right: 20px; }
.has-lightbox { overflow: hidden; }
.toc-box { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin: 28px 0; padding: 18px 20px; }
.toc-box h2 { margin: 0 0 10px; font-size: 18px; }
.toc-box ol { margin: 0; padding-left: 20px; }
.toc-box li { margin: 6px 0; }
.toc-box a { color: var(--text); text-decoration: none; }
.toc-box a:hover { color: var(--accent); }
.toc-level-3 { margin-left: 18px !important; }
.faq-section { margin: 42px 0 0; border-top: 1px solid var(--line); padding-top: 28px; }
.faq-section details { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 14px 16px; }
.faq-section summary { cursor: pointer; font-weight: 700; }
.faq-section p { margin: 10px 0 0; color: var(--muted); }
.content-list { padding-left: 20px; }
.content-list li { margin: 0 0 16px; }
.content-list p { margin: 4px 0 0; color: var(--muted); }
.category-page { margin: 42px auto 76px; }
.category-hero { max-width: 760px; margin-bottom: 28px; }
.article-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.article-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 10px 28px rgba(31, 41, 51, .04); }
.article-card-image { display: block; margin: -20px -20px 16px; overflow: hidden; border-radius: 18px 18px 0 0; background: #eef2f7; }
.article-card-image img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .18s ease; }
.article-card-image:hover img { transform: scale(1.03); }
.article-card h3 { margin: 0 0 8px; font-size: 22px; line-height: 1.25; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent); }
.article-card p { color: var(--muted); margin: 0 0 12px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; }
.sort-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.sort-filter a { border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; background: #fff; color: var(--text); font-size: 14px; font-weight: 700; text-decoration: none; }
.sort-filter a.is-active { border-color: var(--accent); background: #eef6ff; color: var(--accent); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }

@media (max-width: 640px) {
    .site-header { align-items: flex-start; flex-direction: column; }
    .admin-title-row { align-items: flex-start; flex-direction: column; }
    .table-wrap { overflow-x: visible; }
    .admin-table { min-width: 0; }
    .admin-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
    .admin-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
    .admin-table tr:last-child { border-bottom: 0; }
    .admin-table td { border-bottom: 0; padding: 8px 14px; }
    .admin-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
    .table-url, .table-code { max-width: 100%; white-space: normal; word-break: break-word; }
    .redirect-inline-form { align-items: stretch; flex-direction: column; }
    .post-editor-layout { grid-template-columns: 1fr; }
    .post-editor-sidebar { position: static; }
    .title-field input { font-size: 20px; }
    .media-top-grid { grid-template-columns: 1fr; }
    .remote-image-search { grid-template-columns: 1fr; }
    .media-picker-modal { padding: 10px; }
    .media-picker-dialog { max-height: calc(100vh - 20px); }
    .media-picker-stock-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .media-picker-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .media-picker-footer { align-items: stretch; flex-direction: column; }
    .article-gallery-track { grid-auto-columns: minmax(150px, 72vw); padding-left: 46px; padding-right: 46px; }
    .article-gallery-nav { width: 38px; height: 38px; font-size: 28px; }
    .article-lightbox { padding: 18px; }
    .article-lightbox-prev,
    .article-lightbox-next { bottom: 18px; top: auto; transform: none; }
    .section-heading { align-items: flex-start; flex-direction: column; }
}
