/* Design system reused from butaca13 (public/css/base.css + admin.css):
   dark chrome, red accent, light content area. */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

/* ── Header ── */
.site-header {
    background: #1a1a1a;
    color: #fff;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: inherit;
}

.site-header__logo {
    height: 40px;
    width: auto;
    display: block;
}

.site-header__brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.site-header__title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .03em;
}

.site-header__slogan {
    font-size: .72rem;
    font-weight: 400;
    color: #bbb;
}

.site-header__user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .88rem;
    color: #ccc;
}

.site-header__user a {
    color: #ccc;
    text-decoration: none;
}

.site-header__user a:hover {
    color: #fff;
}

/* ── Admin layout ── */
.adm {
    min-height: calc(100vh - 60px);
    background: #f5f5f5;
}

.adm__wrap {
    display: flex;
    min-height: calc(100vh - 60px);
}

.adm__sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #1a1a2e;
    padding: 1.5rem 0;
}

.adm__nav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.adm__nav-title {
    display: block;
    padding: .5rem 1.25rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: .5rem;
}

.adm__nav-link {
    display: block;
    padding: .6rem 1.25rem;
    color: #ccc;
    text-decoration: none;
    font-size: .9rem;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s;
}

.adm__nav-link:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}

.adm__nav-link--active {
    color: #fff;
    border-left-color: #e63946;
    background: rgba(255,255,255,.08);
}

.adm__main {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
}

.adm__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.adm__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

/* ── Stat cards & chart (statistics plugin) ── */
.adm__stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.adm__stat-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    padding: 1.1rem 1.25rem;
}

.adm__stat-card__value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
}

.adm__stat-card__label {
    font-size: .8rem;
    color: #888;
    margin-top: .25rem;
}

.adm__chart {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.adm__chart__title {
    font-size: .95rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 1rem;
}

.adm__chart__svg {
    width: 100%;
    height: auto;
}

.adm__chart__bar {
    fill: #e63946;
}

.adm__chart__bar:hover {
    fill: #c1121f;
}

.adm__chart__axis {
    stroke: #eee;
    stroke-width: 1;
}

.adm__chart__label {
    fill: #888;
    font-size: 9px;
}

.adm__chart__table-toggle {
    margin-top: 1rem;
    font-size: .85rem;
}

.adm__chart__table-toggle summary {
    cursor: pointer;
    color: #444;
}

.adm__chart__table-toggle .adm__table-wrap {
    margin-top: .75rem;
}

.adm__bulk-bar,
.adm__filter-bar {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
    padding: .6rem .9rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.adm__filter-bar select {
    padding: .35rem .5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .85rem;
}

.adm__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
    font-size: .85rem;
    color: #666;
}

.adm__bulk-count {
    font-size: .85rem;
    color: #666;
    margin-right: auto;
}

.adm__bulk-bar .adm__btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Buttons ── */
.adm__btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity .15s, background .15s;
}

.adm__btn--primary {
    background: #e63946;
    color: #fff;
}

.adm__btn--primary:hover {
    background: #c1121f;
}

.adm__btn--ghost {
    background: transparent;
    color: #444;
    border: 1.5px solid #ccc;
}

.adm__btn--ghost:hover {
    background: #f0f0f0;
}

.adm__btn--danger {
    background: transparent;
    color: #c1121f;
    border: 1.5px solid #c1121f;
}

.adm__btn--danger:hover {
    background: #fff0f0;
}

.adm__btn--block {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ── Toast ── */
.adm__toast {
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 500;
}

.adm__toast--ok {
    background: #d1fae5;
    color: #065f46;
}

.adm__toast--err {
    background: #fee2e2;
    color: #991b1b;
}

/* ── Table ── */
.adm__table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.adm__table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: .88rem;
}

.adm__table th {
    text-align: left;
    padding: .75rem 1rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #666;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

.adm__table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    color: #222;
}

.adm__table tr:last-child td {
    border-bottom: none;
}

.adm__table tr:hover td {
    background: #fafafa;
}

.adm__table form {
    display: inline;
}

.adm__actions {
    display: flex;
    gap: .4rem;
    justify-content: flex-end;
}

/* ── Badges ── */
.adm__badge {
    display: inline-block;
    padding: .2rem .5rem;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    white-space: nowrap;
    text-decoration: none;
}

.adm__badge--role-admin {
    background: #ffe4e6;
    color: #9f1239;
}

.adm__badge--role-editor {
    background: #f0e8ff;
    color: #5b21b6;
}

.adm__badge--category {
    background-color: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    font-family: arial, sans-serif;
    font-size: 14px;
    line-height: 27px;
    min-width: 54px;
    padding: 0 16px;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    white-space: pre;
    letter-spacing: normal;
}

.adm__badge--category:hover {
    border-color: #dadce0;
    box-shadow: rgba(0, 0, 0, .1) 0 1px 1px;
    color: #202124;
    cursor: pointer;
}

.adm__badge--category:focus {
    border-color: #4285f4;
    outline: none;
}

.adm__badge--tag {
    background-color: #fff;
    border: 1px solid #d5d9d9;
    border-radius: 8px;
    box-shadow: rgba(213, 217, 217, .5) 0 2px 5px 0;
    box-sizing: border-box;
    color: #0f1111;
    font-family: "Amazon Ember", sans-serif;
    font-size: 13px;
    line-height: 29px;
    padding: 0 10px 0 11px;
    position: relative;
    text-align: center;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    vertical-align: middle;
    letter-spacing: normal;
}

.adm__badge--tag:hover {
    background-color: #f7fafa;
    cursor: pointer;
}

.adm__badge--tag:focus {
    border-color: #008296;
    box-shadow: rgba(213, 217, 217, .5) 0 2px 5px 0;
    outline: 0;
}

.adm__badge--status-draft {
    background: #f3f4f6;
    color: #6b7280;
}

.adm__badge--status-published {
    background: #d1fae5;
    color: #065f46;
}

.adm__badge--severity-debug,
.adm__badge--severity-info {
    background: #e0f0ff;
    color: #1a5ca8;
}

.adm__badge--severity-notice {
    background: #f3f4f6;
    color: #374151;
}

.adm__badge--severity-warning {
    background: #fef3c7;
    color: #92400e;
}

.adm__badge--severity-error,
.adm__badge--severity-critical {
    background: #ffe4e6;
    color: #9f1239;
}

.adm__badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.adm__thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

/* ── Forms ── */
.adm__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.adm__field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.adm__field label {
    font-size: .82rem;
    font-weight: 600;
    color: #444;
}

.adm__field label.required::after {
    content: ' *';
    color: #c1121f;
}

.adm__hint {
    font-weight: 400;
    color: #888;
}

.adm__field input[type="text"],
.adm__field input[type="email"],
.adm__field input[type="password"],
.adm__field select,
.adm__field textarea {
    padding: .55rem .7rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: .9rem;
    font-family: inherit;
    color: #111;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}

.adm__field textarea {
    resize: vertical;
    line-height: 1.5;
}

.adm__field input:focus,
.adm__field select:focus,
.adm__field textarea:focus {
    outline: none;
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, .12);
}

.adm__field input[type="file"] {
    font-size: .85rem;
    color: #444;
    padding: .35rem 0;
}

.adm__field input[type="file"]::file-selector-button {
    padding: .45rem .9rem;
    margin-right: .75rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #444;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.adm__field input[type="file"]::file-selector-button:hover {
    background: #f5f5f5;
    border-color: #e63946;
    color: #e63946;
}

.adm__field--invalid input,
.adm__field--invalid select,
.adm__field--invalid textarea {
    border-color: #c1121f;
}

.field-errors {
    list-style: none;
    margin: 0;
    padding: 0;
}

.field-errors li {
    color: #c1121f;
    font-size: .8rem;
    font-weight: 600;
}

.field-help {
    font-size: .78rem;
    color: #888;
}

.adm__fieldset {
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: .75rem 1rem 1rem;
    margin: 0;
}

.adm__fieldset legend {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #666;
    padding: 0 .4rem;
}

.adm__dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: .5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* ── Standalone form card (used outside the sidebar layout, e.g. new/edit user, login) ── */
.page-narrow {
    max-width: 440px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,.12);
    padding: 1.75rem;
}

.card + .card {
    margin-top: 1.25rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-block;
    color: #444;
    font-size: .88rem;
    text-decoration: none;
    margin-bottom: .75rem;
}

.back-link:hover {
    color: #111;
}

.error-page p {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* ── Public site ── */
.home-fractal-banner {
    width: 100%;
    height: 350px;
    margin-bottom: 1.5rem;
    background: #000;
    overflow: hidden;
}

.home-fractal-banner canvas {
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 640px) {
    .home-fractal-banner {
        height: 220px;
    }
}

.public-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 1.5rem;
}

.sort-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.sort-tabs__link {
    display: inline-block;
    background-color: #fff;
    border: 0;
    border-radius: .5rem;
    box-sizing: border-box;
    color: #111827;
    font-family: "Inter var", ui-sans-serif, system-ui, -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25rem;
    padding: .75rem 1rem;
    text-align: center;
    text-decoration: none #d1d5db solid;
    text-decoration-thickness: auto;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: background-color .15s, color .15s;
}

.sort-tabs__link:hover {
    background-color: rgb(249, 250, 251);
}

.sort-tabs__link:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.sort-tabs__link:focus-visible {
    box-shadow: none;
}

.sort-tabs__link--active {
    background-color: #e63946;
    color: #fff;
}

.sort-tabs__link--active:hover {
    background-color: #c1121f;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-card {
    display: flex;
    gap: 1.25rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    padding: 1.25rem;
}

.article-card__image {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.article-card__body {
    flex: 1;
    min-width: 0;
}

.article-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 .5rem;
}

.article-card__title a {
    color: inherit;
    text-decoration: none;
}

.article-card__title a:hover {
    text-decoration: underline;
}

.article-card__meta {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: .6rem;
}

.article-card__summary {
    color: #444;
    font-size: .92rem;
    line-height: 1.5;
    margin-bottom: .6rem;
}

.article-card__summary img {
    max-width: 100%;
    height: auto;
}

.article-card__footer {
    font-size: .8rem;
    color: #888;
}

@media (max-width: 640px) {
    .article-card {
        flex-direction: column;
    }

    .article-card__image {
        width: 100%;
        height: 180px;
    }
}

/* ── Article detail ── */
.public-shell--narrow {
    max-width: 940px;
}

.article-detail__image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.article-detail__title {
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    margin-bottom: .75rem;
}

.article-detail__meta {
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.article-detail__byline {
    font-size: .85rem;
    color: #888;
    margin-left: .25rem;
}

.article-detail__summary {
    font-size: 1.15rem;
    color: #444;
    font-style: italic;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.article-detail__body {
    font-size: 1.0625rem;
    color: #222;
    line-height: 1.75;
    white-space: pre-wrap;
    text-wrap: pretty;
    hyphens: auto;
}

.article-detail__body h2,
.article-detail__body h3 {
    white-space: normal;
    margin: 1.75rem 0 .75rem;
    color: #111;
    line-height: 1.3;
}

.article-detail__body p {
    white-space: normal;
    margin: 0 0 1.25rem;
}

.article-detail__body ul,
.article-detail__body ol {
    white-space: normal;
    margin: 0 0 1.25rem 1.5rem;
}

.article-detail__body li {
    margin-bottom: .4rem;
}

.article-detail__body blockquote {
    margin: 1.5rem 0;
    padding: .25rem 0 .25rem 1.25rem;
    border-left: 3px solid #e63946;
    color: #555;
    font-style: italic;
    white-space: normal;
}

.article-detail__body a {
    color: #e63946;
}

.article-detail__body table:not(.hljs-ln) {
    white-space: normal;
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: .95rem;
    overflow-x: auto;
    display: block;
}

.article-detail__body table:not(.hljs-ln) th,
.article-detail__body table:not(.hljs-ln) td {
    border: 1px solid #e5e5e5;
    padding: .5rem .75rem;
    text-align: left;
}

.article-detail__body table:not(.hljs-ln) th {
    background: #f5f5f5;
    font-weight: 600;
}

.article-detail__body table:not(.hljs-ln) tr:nth-child(even) td {
    background: #fafafa;
}

.article-detail__body pre {
    white-space: pre;
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: 6px;
}

.article-detail__body .hljs-ln {
    border-collapse: collapse;
}

.article-detail__body .hljs-ln td {
    padding: 0;
    border: none;
    background: transparent;
}

.article-detail__body .hljs-ln-numbers {
    text-align: right;
    color: #aaa;
    border-right: 1px solid #e5e5e5;
    vertical-align: top;
    padding-right: .75em;
    -webkit-user-select: none;
    user-select: none;
}

.article-detail__body .hljs-ln-code {
    padding-left: 1em;
}

.article-detail__body .hljs-ln-n {
    padding-right: 10px;
}

.article-detail__body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 6px;
}

/* ── Term add mini-form (taxonomy page) ── */
.section-title {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
}

.term-add-form {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.term-add-form .adm__field {
    flex: 1;
}

/* ── Footer plugin (Plugins/footer) ── */
.site-footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: .85rem;
    margin-top: 2rem;
}

.site-footer p {
    max-width: 960px;
    margin: 0 auto;
    line-height: 1.6;
}

.site-footer ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .6rem 1rem;
    margin-top: 1.25rem;
}

.site-footer a {
    color: #ccc;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

/* Shared "pill" style for [boton] shortcode links, wherever they appear
   (footer, article bodies) — footer gets its own color override below since
   it sits on a dark background instead of the light content area. */
.shortcode-button {
    display: inline-block;
    padding: .4rem .9rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}

.shortcode-button:hover {
    background: rgba(230, 57, 70, .08);
    border-color: #e63946;
    color: #e63946;
}

.site-footer .shortcode-button {
    color: #ccc;
    border-color: #444;
}

.site-footer .shortcode-button:hover {
    color: #fff;
    border-color: #e63946;
    background: rgba(230, 57, 70, .15);
}

/* ── Linked-article card (shortcode plugin) ── */
.shortcode-article-card {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    margin: .75rem 0;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}

.shortcode-article-card:hover {
    border-color: #e63946;
    background: rgba(230, 57, 70, .04);
}

.shortcode-article-card__image {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
}

.shortcode-article-card__title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .95rem;
    font-weight: 600;
    color: #222;
}

.shortcode-article-card:hover .shortcode-article-card__title {
    color: #e63946;
}

/* ── Social share links (social_share plugin) ── */
.social-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin: 1.5rem 0;
    padding-top: 1.25rem;
    border-top: 1px solid #eee;
}

.social-share__label {
    font-size: .85rem;
    font-weight: 600;
    color: #555;
}

.social-share__list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.social-share__link {
    display: inline-block;
    padding: .35rem .85rem;
    border-radius: 999px;
    border: 1px solid #ddd;
    color: #444;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}

.social-share__link:hover {
    border-color: #e63946;
    color: #e63946;
    background: rgba(230, 57, 70, .06);
}

/* ── Reusable blocks (blocks plugin) ── */
.block {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.block__title {
    margin: 0 0 .9rem;
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tag-cloud__link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    border: 1px solid #ddd;
    color: #444;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
}

.tag-cloud__link:hover {
    border-color: #e63946;
    color: #e63946;
    background: rgba(230, 57, 70, .06);
}

.tag-cloud__count {
    color: #999;
    font-weight: 400;
    font-size: .78rem;
}

.recent-articles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.recent-articles__item a {
    color: #222;
    text-decoration: none;
    font-size: .92rem;
}

.recent-articles__item a:hover {
    color: #e63946;
    text-decoration: underline;
}

.recent-articles-cards {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.recent-articles-cards__item {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}

.recent-articles-cards__image {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
}

.recent-articles-cards__title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .9rem;
    font-weight: 600;
    color: #222;
    line-height: 1.35;
    transition: color .15s;
}

.recent-articles-cards__item:hover .recent-articles-cards__title {
    color: #e63946;
}

/* ── Async operations panel (admin, all pages) ── */
.ops-panel {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 300px;
    max-width: calc(100vw - 3rem);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    z-index: 100;
    overflow: hidden;
}

.ops-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .9rem;
    background: #1a1a1a;
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
}

.ops-panel__toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 .25rem;
}

.ops-panel__list {
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
}

.ops-panel--collapsed .ops-panel__list {
    display: none;
}

.ops-panel__item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .9rem;
    border-top: 1px solid #f0f0f0;
    font-size: .82rem;
    color: #333;
}

.ops-panel__dot {
    flex-shrink: 0;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: #ccc;
}

.ops-panel__item--pending .ops-panel__dot {
    background: #f4a100;
    animation: ops-pulse 1.2s ease-in-out infinite;
}

.ops-panel__item--success .ops-panel__dot {
    background: #2a9d5c;
}

.ops-panel__item--failed .ops-panel__dot {
    background: #e63946;
}

.ops-panel__item--failed .ops-panel__label {
    color: #c1121f;
}

.ops-panel__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes ops-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

/* ── Related articles plugin (Plugins/related_articles) ── */
.related-articles-picker {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: .5rem;
}

.related-articles-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.related-articles-row__input {
    flex: 1;
}

.related-articles-row__remove {
    flex-shrink: 0;
    padding: .45rem .7rem;
    font-size: 1rem;
    line-height: 1;
}

.related-articles {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

.related-articles__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: .75rem;
}

.related-articles__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.related-articles__list a {
    color: #e63946;
    text-decoration: none;
    font-size: .95rem;
}

.related-articles__list a:hover {
    text-decoration: underline;
}
