:root {
    --wx-accent: #2271b1;
    --wx-bg: #f4f6f8;
    --wx-panel: #ffffff;
    --wx-text: #17212b;
    --wx-muted: #657382;
    --wx-border: #d6dde5;
    --wx-danger: #b42318;
    --wx-success: #027a48;
    --wx-sidebar: #1d252d;
    --wx-radius: 14px;
    --wx-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    --wx-container: 1120px;
    --wx-base-font-size: 16px;
    --wx-button-radius: 10px;
    --wx-card-spacing: 20px;
    --wx-body-font: system-ui;
    --wx-heading-font: system-ui;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--wx-text);
    background: var(--wx-bg);
    font-family: var(--wx-body-font), ui-sans-serif, system-ui, sans-serif;
    font-size: var(--wx-base-font-size);
}

a {
    color: var(--wx-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--wx-heading-font), ui-sans-serif, system-ui, sans-serif;
}

input,
textarea,
select,
button {
    font: inherit;
}

input,
textarea,
select {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    color: var(--wx-text);
    background: #ffffff;
    border: 1px solid var(--wx-border);
    border-radius: 10px;
}

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

label {
    display: block;
    margin-bottom: 14px;
    font-weight: 650;
}

code {
    padding: 2px 5px;
    background: #eef2f7;
    border-radius: 6px;
}

.wx-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    background: var(--wx-accent);
    border: 1px solid var(--wx-accent);
    border-radius: var(--wx-button-radius);
}

.wx-button:hover {
    filter: brightness(0.96);
    text-decoration: none;
}

.wx-button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.wx-button-secondary {
    color: var(--wx-accent);
    background: #ffffff;
}

.wx-button-danger {
    background: var(--wx-danger);
    border-color: var(--wx-danger);
}

.wx-muted {
    color: var(--wx-muted);
}

.wx-kicker {
    color: var(--wx-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wx-alert {
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: 10px;
}

.wx-alert-error {
    color: var(--wx-danger);
    background: #fff1f1;
    border-color: #ffd7d7;
}

.wx-alert-success {
    color: var(--wx-success);
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.wx-pill {
    display: inline-block;
    padding: 4px 8px;
    color: #334155;
    font-size: 12px;
    background: #edf2f7;
    border-radius: 999px;
}

.wx-auth {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
}

.wx-auth-card {
    width: min(480px, 100%);
    padding: 32px;
    background: var(--wx-panel);
    border: 1px solid var(--wx-border);
    border-radius: 22px;
    box-shadow: var(--wx-shadow);
}

.wx-brand-mark,
.wx-admin-brand span,
.wx-site-brand span {
    display: inline-grid;
    width: 38px;
    height: 38px;
    color: #ffffff;
    font-weight: 900;
    background: var(--wx-accent);
    border-radius: 11px;
    place-items: center;
}

.wx-form {
    display: grid;
    gap: 10px;
}

.wx-inline-form {
    align-items: end;
    grid-template-columns: 1.2fr 1fr auto;
}

.wx-admin {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 270px 1fr;
}

.wx-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px;
    color: #d9e2ec;
    overflow-y: auto;
    background: var(--wx-sidebar);
}

.wx-admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: #ffffff;
}

.wx-admin-brand:hover {
    text-decoration: none;
}

.wx-sidebar nav {
    display: grid;
    gap: 4px;
}

.wx-sidebar nav p {
    margin: 18px 8px 6px;
    color: #93a4b7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wx-sidebar nav a {
    padding: 10px 12px;
    color: #d9e2ec;
    border-radius: 10px;
}

.wx-sidebar nav a:hover,
.wx-sidebar nav a.active {
    color: #ffffff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
}

.wx-admin-main {
    min-width: 0;
}

.wx-admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    padding: 0 28px;
    background: #ffffff;
    border-bottom: 1px solid var(--wx-border);
}

.wx-admin-topbar div {
    display: grid;
    gap: 2px;
}

.wx-admin-topbar span {
    color: var(--wx-muted);
    font-size: 14px;
}

.wx-admin-content {
    padding: 28px;
}

.wx-page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.wx-page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
}

.wx-page-title p {
    margin: 0 0 4px;
}

.wx-panel,
.wx-card {
    padding: var(--wx-card-spacing);
    background: var(--wx-panel);
    border: 1px solid var(--wx-border);
    border-radius: var(--wx-radius);
    box-shadow: var(--wx-shadow);
}

.wx-panel h2 {
    margin-top: 0;
}

.wx-stats {
    display: grid;
    gap: 16px;
    margin-bottom: 22px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wx-stat {
    display: grid;
    gap: 4px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--wx-border);
    border-radius: var(--wx-radius);
}

.wx-stat strong {
    font-size: 34px;
}

.wx-stat span {
    color: var(--wx-muted);
}

.wx-two-col {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wx-list-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--wx-border);
}

.wx-list-row:first-of-type {
    border-top: 0;
}

.wx-list-row div,
.wx-list-row-stack {
    display: grid;
    gap: 4px;
}

.wx-list-row span {
    color: var(--wx-muted);
    font-size: 14px;
}

.wx-table {
    width: 100%;
    border-collapse: collapse;
}

.wx-table th,
.wx-table td {
    padding: 13px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--wx-border);
}

.wx-table th {
    color: var(--wx-muted);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wx-editor-form {
    display: grid;
    align-items: start;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) 340px;
}

.wx-editor-main,
.wx-editor-side {
    display: grid;
    gap: 20px;
}

.wx-button-row,
.wx-ai-buttons,
.wx-row-actions,
.wx-status-tabs,
.wx-term-row,
.wx-content-taxonomy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.wx-row-actions form,
.wx-inline-delete {
    display: inline;
}

.wx-row-actions button,
.wx-inline-delete button {
    padding: 0;
    color: var(--wx-accent);
    cursor: pointer;
    background: transparent;
    border: 0;
}

.wx-row-actions-stack {
    align-items: flex-start;
    flex-direction: column;
}

.wx-status-tabs {
    margin-bottom: 18px;
}

.wx-status-tabs a {
    padding: 7px 10px;
    color: #334155;
    background: #ffffff;
    border: 1px solid var(--wx-border);
    border-radius: 999px;
}

.wx-status-tabs a.active {
    color: #ffffff;
    background: var(--wx-accent);
    border-color: var(--wx-accent);
}

.wx-ai-studio,
.wx-settings-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wx-settings-actions {
    grid-column: 1 / -1;
}

.wx-danger-form {
    margin-top: 20px;
}

.wx-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wx-checkbox input {
    width: auto;
    margin: 0;
}

.wx-toolbar-panel {
    margin-bottom: 18px;
}

.wx-filter-bar {
    display: grid;
    align-items: end;
    gap: 14px;
    grid-template-columns: minmax(180px, 1fr) 220px auto;
}

.wx-two-field-row {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 180px;
}

.wx-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    margin-bottom: 12px;
    background: #f8fafc;
    border: 1px solid var(--wx-border);
    border-radius: 12px;
}

.wx-editor-toolbar button {
    width: auto;
    padding: 7px 10px;
    color: var(--wx-text);
    font-weight: 700;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid var(--wx-border);
    border-radius: 9px;
}

.wx-editor-preview {
    padding: 18px;
    margin-top: 12px;
    background: #ffffff;
    border: 1px dashed var(--wx-border);
    border-radius: 12px;
}

.wx-pattern-insert {
    display: grid;
    align-items: end;
    gap: 10px;
    margin-bottom: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.wx-media-grid {
    display: grid;
    gap: 18px;
    margin-top: 18px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.wx-media-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--wx-border);
    border-radius: var(--wx-radius);
    box-shadow: var(--wx-shadow);
}

.wx-media-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #eef2f7;
}

.wx-media-card div {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.wx-mini-media {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, 1fr);
}

.wx-mini-media button {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid var(--wx-border);
    border-radius: 10px;
}

.wx-mini-media img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.wx-theme-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.wx-theme-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--wx-border);
    border-radius: var(--wx-radius);
    box-shadow: var(--wx-shadow);
}

.wx-theme-card.active {
    outline: 3px solid color-mix(in srgb, var(--wx-accent), transparent 72%);
}

.wx-theme-preview {
    display: grid;
    height: 160px;
    color: #ffffff;
    background: linear-gradient(135deg, #17212b, var(--wx-accent));
    place-items: center;
}

.wx-theme-preview span {
    display: grid;
    width: 64px;
    height: 64px;
    font-size: 34px;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    place-items: center;
}

.wx-theme-preview-minimal {
    color: #17212b;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
}

.wx-theme-preview-newsroom {
    background: linear-gradient(135deg, #111827, #991b1b);
}

.wx-theme-preview-express-astra {
    color: #0f172a;
    background: linear-gradient(135deg, #ffffff, #eaf3ff);
}

.wx-theme-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.wx-theme-body h2 {
    margin: 0;
}

.wx-term-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wx-term-cloud span,
.wx-term-row a,
.wx-content-taxonomy a {
    display: inline-flex;
    padding: 5px 9px;
    color: #334155;
    font-size: 13px;
    background: #edf2f7;
    border-radius: 999px;
}

.wx-site {
    background: #ffffff;
}

.wx-site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: var(--wx-container);
    margin: 0 auto;
    padding: 18px 22px;
}

.wx-site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--wx-text);
}

.wx-site-brand:hover {
    text-decoration: none;
}

.wx-site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.wx-site-search input {
    width: 150px;
    padding: 8px 10px;
    margin: 0;
}

.wx-site-shell {
    display: grid;
    gap: 28px;
    max-width: var(--wx-container);
    margin: 0 auto;
    padding: 30px 22px 70px;
    grid-template-columns: minmax(0, 1fr) 300px;
}

.wx-layout-left-sidebar .wx-site-shell {
    grid-template-columns: 300px minmax(0, 1fr);
}

.wx-layout-left-sidebar .wx-site-sidebar {
    order: -1;
}

.wx-layout-full-width .wx-site-shell {
    grid-template-columns: 1fr;
}

.wx-site-main {
    min-width: 0;
}

.wx-site-sidebar {
    min-width: 0;
}

.wx-site-footer {
    padding: 28px 22px;
    color: var(--wx-muted);
    text-align: center;
    border-top: 1px solid var(--wx-border);
}

.wx-footer-widgets {
    display: grid;
    gap: 22px;
    max-width: var(--wx-container);
    margin: 0 auto 24px;
    text-align: left;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wx-hero {
    max-width: 780px;
    padding: 60px 0 42px;
}

.wx-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1;
}

.wx-hero p:not(.wx-kicker) {
    color: var(--wx-muted);
    font-size: 20px;
}

.wx-inline-search {
    display: grid;
    gap: 10px;
    max-width: 560px;
    margin-top: 20px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.wx-inline-search input {
    margin: 0;
}

.wx-post-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.wx-post-card h2 {
    margin-top: 0;
}

.wx-cover {
    width: 100%;
    margin-bottom: 12px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
}

.wx-article {
    max-width: 780px;
    margin: 0 auto;
}

.wx-template-wide {
    max-width: 1040px;
}

.wx-template-landing {
    max-width: 960px;
    text-align: center;
}

.wx-template-landing .wx-prose {
    text-align: left;
}

.wx-article h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.05;
}

.wx-lede {
    color: var(--wx-muted);
    font-size: 21px;
    line-height: 1.5;
}

.wx-article-cover {
    width: 100%;
    margin-bottom: 26px;
    border-radius: 18px;
}

.wx-prose {
    font-size: 18px;
    line-height: 1.75;
}

.wx-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.wx-prose pre {
    padding: 16px;
    overflow: auto;
    color: #f8fafc;
    background: #0f172a;
    border-radius: 12px;
}

.wx-prose blockquote {
    padding-left: 18px;
    margin-left: 0;
    color: #475569;
    border-left: 4px solid var(--wx-accent);
}

.wx-prose .wx-button {
    color: #ffffff;
}

.wx-prose table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
}

.wx-prose th,
.wx-prose td {
    padding: 10px;
    text-align: left;
    border: 1px solid var(--wx-border);
}

.wx-prose figcaption {
    margin-top: 6px;
    color: var(--wx-muted);
    font-size: 14px;
    text-align: center;
}

.wx-columns {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wx-widget-area {
    display: grid;
    gap: 18px;
}

.wx-widget {
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--wx-border);
    border-radius: var(--wx-radius);
}

.wx-widget h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.wx-widget ul {
    padding-left: 18px;
    margin: 0;
}

.wx-widget-search {
    display: grid;
    gap: 8px;
}

.wx-widget-search input {
    margin: 0;
}

.wx-widget-search button {
    padding: 9px 10px;
    color: #ffffff;
    cursor: pointer;
    background: var(--wx-accent);
    border: 0;
    border-radius: var(--wx-button-radius);
}

.wx-comments {
    max-width: 780px;
    margin: 48px auto 0;
}

.wx-comment {
    padding: 16px 0;
    border-top: 1px solid var(--wx-border);
}

.wx-comment header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--wx-muted);
}

.wx-comment-form {
    margin-top: 22px;
}

.wx-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.wx-chat {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10;
}

.wx-chat-toggle {
    padding: 12px 16px;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    background: var(--wx-accent);
    border: 0;
    border-radius: 999px;
    box-shadow: var(--wx-shadow);
}

.wx-chat-panel {
    position: absolute;
    right: 0;
    bottom: 54px;
    width: min(360px, calc(100vw - 36px));
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--wx-border);
    border-radius: 18px;
    box-shadow: var(--wx-shadow);
}

.wx-chat-panel header {
    padding: 12px 14px;
    font-weight: 800;
    border-bottom: 1px solid var(--wx-border);
}

.wx-chat-log {
    display: grid;
    align-content: start;
    gap: 10px;
    height: 260px;
    padding: 12px;
    overflow-y: auto;
    background: #f8fafc;
}

.wx-chat-message {
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 13px;
}

.wx-chat-user {
    margin-left: 40px;
    color: #ffffff;
    background: var(--wx-accent);
}

.wx-chat-assistant {
    margin-right: 30px;
    background: #ffffff;
    border: 1px solid var(--wx-border);
}

.wx-chat-form {
    display: grid;
    gap: 8px;
    padding: 10px;
    grid-template-columns: 1fr auto;
}

.wx-chat-form input {
    margin: 0;
}

.wx-chat-form button {
    padding: 0 12px;
    color: #ffffff;
    cursor: pointer;
    background: var(--wx-accent);
    border: 0;
    border-radius: 10px;
}

.wx-mt {
    margin-top: 20px;
}

.wx-nowrap {
    white-space: nowrap;
}

.wx-topbar-actions {
    display: flex !important;
    align-items: center;
    gap: 12px;
}

@media (max-width: 1000px) {
    .wx-admin,
    .wx-editor-form,
    .wx-site-shell {
        grid-template-columns: 1fr;
    }

    .wx-sidebar {
        position: static;
        height: auto;
    }

    .wx-sidebar nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wx-sidebar nav p {
        grid-column: 1 / -1;
    }

    .wx-site-sidebar {
        order: initial;
    }
}

@media (max-width: 900px) {
    .wx-stats,
    .wx-two-col,
    .wx-ai-studio,
    .wx-settings-grid,
    .wx-footer-widgets,
    .wx-columns {
        grid-template-columns: 1fr;
    }

    .wx-inline-form,
    .wx-filter-bar,
    .wx-two-field-row,
    .wx-pattern-insert,
    .wx-inline-search {
        grid-template-columns: 1fr;
    }

    .wx-topbar-actions {
        align-items: flex-end;
        flex-direction: column;
    }

    .wx-site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .wx-site-search input {
        width: 100%;
    }
}
