:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #eef2f7;
    --surface-dark: #0f172a;
    --text: #111827;
    --muted: #6b7280;
    --line: #d7dde5;
    --shadow: none;
    --radius-xl: 0;
    --radius-lg: 0;
    --radius-md: 0;
    --radius-sm: 0;
    --accent: #0f766e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(15, 118, 110, 0.12), transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(14, 165, 233, 0.12), transparent 28%),
        var(--bg);
}
body.mode-admin {
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.page-shell {
    width: min(1360px, calc(100% - 40px));
    margin: 0 auto;
}

.panel {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 24px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--muted);
}

.brand {
    display: grid;
    gap: 4px;
}
.brand strong {
    font-size: 18px;
    line-height: 1.1;
}
.brand span {
    color: var(--muted);
    font-size: 12px;
}
.brand-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: #94a3b8;
    font-weight: 800;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(244, 246, 248, .88);
    backdrop-filter: blur(18px);
    border-bottom: 0;
    box-shadow: none;
}
.topbar-inner {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.site-search, .search-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-search {
    align-items: stretch;
}
.site-search input, .search-page-form input {
    min-width: 220px;
    background: rgba(255, 255, 255, .9);
}
.site-search input,
.site-search button {
    height: 36px;
}
.site-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.site-nav a {
    padding: 10px 12px;
    border-radius: 0;
    border: 0;
    color: #374151;
    font-weight: 700;
    font-size: 13px;
}
.site-nav a:hover {
    background: rgba(17, 24, 39, .05);
}
.nav-accent {
    background: #111827;
    color: #fff !important;
}

.main { padding: 24px 0 40px; }
.main-public { padding-top: 26px; }

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .01em;
}
.breadcrumbs a {
    color: #4b5563;
    font-weight: 700;
}
.breadcrumbs a:hover {
    color: #111827;
}
.breadcrumbs-sep {
    color: #c0c7d1;
}
.breadcrumbs-current {
    color: #111827;
    font-weight: 800;
}

.flash {
    border-radius: 0;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-weight: 700;
}
.flash-success { background: #ecfdf5; color: #166534; border: 0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 0; }
.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 80;
    display: grid;
    gap: 10px;
    width: min(340px, calc(100vw - 36px));
}
.toast {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(17, 24, 39, .96);
    color: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
}
.toast-success {
    background: rgba(15, 118, 110, .96);
}
.toast-error {
    background: rgba(153, 27, 27, .96);
}
.toast.is-hiding {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .2s ease, transform .2s ease;
}
.toast-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    opacity: .85;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.9fr);
    gap: 24px;
}
.panel-hero {
    padding: 28px;
}
.hero-copy h1, .section-head h1, .section-head h2, .panel h1, .panel h2 {
    margin: 10px 0 12px;
    line-height: 1.02;
}
.hero-copy h1 {
    font-size: clamp(34px, 4.8vw, 68px);
    letter-spacing: -.04em;
}
.hero .hero-copy h1.hero-title-compact {
    font-size: clamp(28px, 3vw, 34px);
    line-height: 1.22;
    letter-spacing: -.03em;
}
.section-hero-copy {
    display: grid;
    gap: 12px;
}
.lead {
    color: #374151;
    font-size: 17px;
    line-height: 1.65;
    margin: 0;
    max-width: 66ch;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    border: 0;
    min-height: 44px;
    padding: 0 18px;
    font-weight: 800;
    cursor: pointer;
}
.btn-primary {
    background: #111827;
    color: #fff;
}
.btn-primary:hover { background: #000; }
.btn-ghost {
    background: rgba(17, 24, 39, .05);
}
.btn-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: transparent;
}
.btn-small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
}
.btn-block { width: 100%; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.hero-stats div, .section-kpi, .stat-card {
    background: var(--surface-soft);
    border-radius: 0;
    padding: 14px;
}
.hero-stats strong, .section-kpi strong, .stat-card strong {
    display: block;
    font-size: 24px;
    margin-bottom: 6px;
}
.hero-stats span, .section-kpi span, .stat-card span {
    color: var(--muted);
    font-size: 13px;
}

.hero-panel {
    display: grid;
    gap: 14px;
}
.section-hero-news {
    grid-template-columns: 1fr;
}
.hero-card-dark {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #e5e7eb;
    border-color: #0f172a;
}
.hero-card-dark strong {
    display: block;
    font-size: 18px;
    line-height: 1.4;
    margin: 10px 0 8px;
}
.hero-card-dark p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
}
.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.mini-tile {
    border-radius: 0;
    padding: 14px;
    background: #fff;
    border: 0;
    display: grid;
    gap: 8px;
    min-height: 140px;
    box-shadow: none;
    transition: transform .18s ease, background-color .18s ease;
}
.mini-tile:hover { transform: translateY(-1px); background: #f8fafc; }
.mini-tile-disabled {
    opacity: .72;
    cursor: default;
}
.mini-tile-disabled:hover {
    transform: none;
    background: #fff;
}
.mini-tile strong { font-size: 16px; }
.mini-tile small { color: var(--muted); line-height: 1.5; }
.mini-mark {
    width: 38px;
    height: 38px;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    font-weight: 900;
}

.section-block { margin-top: 24px; }
.section-search {
    margin: 0 0 18px;
}
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.section-head p {
    margin: 0;
    color: var(--muted);
    max-width: 60ch;
}
.section-head.compact { align-items: flex-start; }
.soft-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.soft-tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 0;
    border: 0;
    background: rgba(255,255,255,.9);
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}
.tile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.section-tile {
    border-radius: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.84));
    border: 0;
    padding: 18px;
    min-height: 210px;
    display: grid;
    gap: 14px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, background-color .18s ease;
}
.section-tile::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    height: 4px;
    width: 100%;
    background: var(--accent);
}
.section-tile:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.98);
}
.section-tile-disabled {
    opacity: .78;
    cursor: default;
}
.section-tile-disabled:hover {
    transform: none;
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.84));
}
.section-tile h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.03em;
}
.section-tile p {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}
.section-tile-top, .story-meta, .story-foot, .row-actions, .section-hero-side {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.tile-badge, .pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 0;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}
.tile-count {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
}
.tile-link {
    color: var(--accent);
    font-weight: 800;
}

.two-col {
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 14px;
}
.content-stack, .activity-list, .user-list {
    display: grid;
    gap: 12px;
}
.user-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.story-card, .activity-item, .user-card {
    border-radius: 0;
    border: 0;
    background: #fff;
    padding: 16px;
    transition: transform .18s ease, background-color .18s ease;
}
.story-card:hover, .activity-item:hover, .user-card:hover { transform: translateY(-1px); background: #f8fafc; }
.story-media,
.detail-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent, #111827), #334155);
    color: #fff;
    margin-bottom: 12px;
}
.story-media img,
.detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-media-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: end start;
    padding: 14px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
    background:
        linear-gradient(135deg, rgba(17, 24, 39, .15), rgba(17, 24, 39, .42)),
        linear-gradient(135deg, var(--accent, #111827), #334155);
}
.story-card h3 {
    margin: 8px 0 10px;
    font-size: 20px;
}
.story-grid-featured {
    align-items: stretch;
}
.story-card-featured {
    grid-column: 1 / -1;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.03), rgba(255, 255, 255, 0.98));
    border-color: rgba(17, 24, 39, 0.14);
}
.story-card-featured h3 {
    font-size: 24px;
}
.story-card p, .activity-item p, .user-card small {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}
.detail-article {
    display: grid;
    gap: 16px;
}
.detail-article-news {
    gap: 18px;
}
.detail-body {
    color: #374151;
    line-height: 1.8;
    font-size: 17px;
    white-space: pre-line;
}
.detail-body-rich {
    white-space: normal;
    display: grid;
    gap: 1.2em;
    max-width: 74ch;
    font-size: 18px;
    line-height: 1.95;
    color: #243041;
}
.detail-body-rich p {
    margin: 0;
}
.detail-body-rich p + p {
    margin-top: 0;
}
.detail-body-rich h2,
.detail-body-rich h3,
.detail-body-rich h4,
.detail-body-rich h5,
.detail-body-rich h6 {
    margin: 1.5em 0 0.6em;
    line-height: 1.28;
    letter-spacing: -.02em;
    color: #111827;
}
.detail-body-rich ul,
.detail-body-rich ol {
    margin: 0;
    padding-left: 1.35em;
}
.detail-body-rich li + li {
    margin-top: 0.4em;
}
.detail-body-rich blockquote {
    margin: 0;
    padding: 12px 16px 12px 18px;
    border-left: 4px solid rgba(17, 24, 39, .12);
    background: rgba(15, 23, 42, .03);
    color: #334155;
}
.detail-body-rich figure {
    margin: 0;
    display: grid;
    gap: 10px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, .02), rgba(15, 23, 42, .05));
}
.detail-body-rich img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    background: #eef2f7;
}
.detail-body-rich a {
    color: #0f766e;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.detail-body-rich figcaption {
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
    max-width: 64ch;
}
.detail-body-rich table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
}
.detail-body-rich th,
.detail-body-rich td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.detail-body-rich th {
    color: #111827;
    font-weight: 800;
}
.detail-body-rich picture {
    display: block;
}
.detail-body-rich source {
    display: none;
}
.detail-body-rich iframe,
.story-body-rich iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
    background: #0f172a;
}
.story-body-rich {
    margin-top: 10px;
    display: grid;
    gap: 12px;
    color: #374151;
    line-height: 1.7;
    font-size: 15px;
}
.story-body-rich p,
.story-body-rich ul,
.story-body-rich ol,
.story-body-rich blockquote,
.story-body-rich figure,
.story-body-rich table {
    margin: 0;
}
.detail-article h3 a {
    color: inherit;
}
.story-card-wide .story-body {
    margin-top: 10px;
    color: #374151;
    line-height: 1.7;
}
.story-foot {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}
.story-foot a,
.thread-author a,
.thread-comment-head a {
    color: inherit;
    font-weight: inherit;
    line-height: inherit;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.story-date {
    color: #9ca3af;
    font-weight: 500;
}
.story-date time:first-child {
    color: inherit;
}

.threads-layout {
    align-items: start;
}
.thread-feed {
    display: grid;
    gap: 14px;
}
.thread-card {
    border-radius: 0;
    border: 0;
    background: transparent;
    padding: 0;
    transition: transform .18s ease, background-color .18s ease;
}
.thread-card:hover { transform: translateY(-1px); background: transparent; }
.thread-card h3 {
    margin: 10px 0 10px;
    font-size: 22px;
    letter-spacing: -.02em;
}
.thread-card-featured {
    background: transparent;
}
.thread-card-featured h3 {
    font-size: 24px;
}
.thread-card p {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}
.thread-stats, .thread-actions, .thread-comment-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.thread-stats {
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}
.thread-actions {
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 0;
}
.thread-author {
    color: var(--muted);
    font-size: 14px;
}
.thread-comments {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.thread-comment {
    border-radius: 0;
    background: var(--surface-soft);
    padding: 12px 14px;
}
.thread-comment-head {
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--muted);
}
.thread-comment p {
    margin: 0;
    line-height: 1.55;
}
.thread-reply {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}
.thread-spotlight {
    margin-top: 14px;
    padding: 16px;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.92));
    border: 0;
    display: grid;
    gap: 10px;
}
.thread-spotlight h3 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -.02em;
}
.thread-spotlight p {
    margin: 0;
    color: #334155;
    line-height: 1.6;
}
.thread-spotlight-foot {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.inline-link {
    display: inline-flex;
    margin-left: 6px;
    color: #111827;
    font-weight: 800;
    text-decoration: underline;
}
.panel-note {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 0;
    background: var(--surface-soft);
    color: #334155;
    line-height: 1.6;
}

.login-wrap {
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
}
.login-card {
    width: min(560px, 100%);
}
.form-grid {
    display: grid;
    gap: 14px;
}
.field, .form-grid label {
    display: grid;
    gap: 7px;
}
.field span, .form-grid label span {
    font-size: 13px;
    font-weight: 100;
    color: #a8a8a8;
}
.reference-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}
.reference-title-row > .field {
    min-width: 0;
}
.publish-editor-hint {
    margin-top: 6px !important;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b !important;
    max-width: 68ch;
}
.rich-editor-shell {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}
.rich-editor-modebar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}
.rich-editor-toolbar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
}
.rich-editor-modebar .btn,
.rich-editor-toolbar .btn {
    color: #0f172a;
}
.rich-editor-modebar .btn svg,
.rich-editor-toolbar .btn svg {
    width: 16px;
    height: 16px;
    display: block;
    flex: 0 0 16px;
    fill: currentColor;
    pointer-events: none;
}
.rich-editor-shell > .rich-editor,
.rich-editor-shell > .rich-editor-source {
    flex: 1 0 100%;
}
.rich-upload-btn {
    position: relative;
    overflow: hidden;
}
.rich-editor-source {
    display: none;
    width: 100%;
    min-height: 320px;
    padding: 16px;
    border: 0;
    background: #111827;
    color: #e5e7eb;
    font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    resize: vertical;
}
.rich-editor-shell.is-html-mode .rich-editor {
    display: none;
}
.rich-editor-shell.is-html-mode .rich-editor-source {
    display: block;
}
.rich-editor {
    min-height: 320px;
    padding: 16px 18px;
    background: #f8fafc;
    color: #111827;
    line-height: 1.7;
    outline: none;
    overflow: auto;
}
.rich-editor:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
}
.rich-editor p {
    margin: 0 0 14px;
}
.rich-editor h2,
.rich-editor h3,
.rich-editor h4 {
    margin: 18px 0 12px;
    line-height: 1.2;
}
.rich-editor figure {
    margin: 0 0 14px;
    display: grid;
    gap: 10px;
    padding: 14px;
    background: rgba(15, 23, 42, .03);
}
.rich-editor img,
.rich-editor iframe {
    width: 100%;
    display: block;
    border: 0;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}
.rich-editor blockquote {
    margin: 0 0 14px;
    padding: 12px 16px;
    border-left: 4px solid rgba(17, 24, 39, .12);
    background: rgba(15, 23, 42, .03);
    color: #334155;
}
.publish-rich-field {
    gap: 7px;
}
.publish-rich-editor {
    border: 0;
}
input, textarea, select {
    width: 100%;
    border-radius: 0;
    border: 0;
    background: #f8fafc;
    padding: 12px 14px;
    outline: none;
    transition: background-color .15s ease, outline-color .15s ease;
}
input:focus, textarea:focus, select:focus {
    background: #fff;
    outline: 2px solid rgba(17, 24, 39, .16);
    outline-offset: 0;
}
textarea { resize: vertical; }
.checkline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #374151;
}
.checkline input { width: auto; }

.sidebar {
    width: 156px;
    min-height: 100vh;
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
    padding: 12px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 0;
    align-self: flex-start;
}
.sidebar .brand strong, .sidebar .brand span, .sidebar .brand-kicker { color: inherit; }
.sidebar .brand span { color: #94a3b8; }
.sidebar-nav {
    display: grid;
    gap: 5px;
}
.sidebar-group {
    display: grid;
    gap: 6px;
}
.sidebar-group-title {
    color: #94a3b8;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 800;
    padding: 0 2px;
}
.sidebar-group-links {
    display: grid;
    gap: 5px;
}
.sidebar-nav a {
    color: #e5e7eb;
    padding: 8px 9px;
    border-radius: 0;
    border: 0;
    background: rgba(255,255,255,.03);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.15;
}
.sidebar-nav a.active, .sidebar-nav a:hover {
    background: rgba(255,255,255,.12);
}
.sidebar-foot {
    display: grid;
    gap: 10px;
    margin-top: auto;
}
.sidebar-user-widget {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
}
.sidebar-user-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 900;
    font-size: 14px;
}
.sidebar-user-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}
.sidebar-user-menu {
    position: relative;
    min-width: 0;
}
.sidebar-user-menu summary {
    list-style: none;
    cursor: pointer;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    min-width: 0;
}
.sidebar-user-login {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-menu summary::-webkit-details-marker { display: none; }
.sidebar-user-dropdown {
    position: absolute;
    left: 0;
    right: auto;
    bottom: calc(100% + 8px);
    display: grid;
    gap: 6px;
    min-width: 220px;
    max-width: 240px;
    padding: 12px;
    background: #111827;
    color: #e5e7eb;
    box-shadow: none;
    z-index: 5;
    max-width: calc(100vw - 36px);
}
.sidebar-user-dropdown span {
    color: #cbd5e1;
    font-size: 13px;
}
.sidebar-user-dropdown a {
    color: #fff;
    font-weight: 800;
}
.sidebar-user-dropdown a:hover {
    color: #fbbf24;
}
.sidebar-logout-form {
    display: flex;
}
.sidebar-logout {
    background: #fbbf24;
    color: #111827;
    font-weight: 900;
    letter-spacing: .01em;
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
}
.sidebar-logout:hover {
    background: #f59e0b;
}

.admin-shell {
    display: grid;
    grid-template-columns: 156px minmax(0, 1fr);
    overflow-x: clip;
}
.admin-shell > .main {
    min-width: 0;
    overflow-x: clip;
}
.main .page-shell {
    width: min(1400px, calc(100% - 28px));
}
.mode-admin .main {
    padding: 18px 0 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.dashboard-stack {
    display: grid;
    gap: 14px;
}
.site-footer-admin {
    margin-top: auto;
    padding-top: 18px;
    padding-bottom: 0;
}
.site-footer-public {
    margin-top: 24px;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.admin-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.admin-group-stack {
    display: grid;
    gap: 14px;
}
.admin-group-panel {
    display: grid;
    gap: 14px;
}
.admin-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0 16px;
}
.admin-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    background: var(--surface-soft);
    font-size: 13px;
    font-weight: 800;
}
.admin-tabs a.active {
    background: #111827;
    color: #fff;
}
.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.admin-link-card {
    display: grid;
    gap: 4px;
    padding: 16px;
    border-radius: 0;
    border: 0;
    background: #fff;
}
.admin-link-card span { color: var(--muted); font-size: 13px; }

.resource-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, .8fr);
    gap: 18px;
}
.publish-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 18px;
    margin-top: 18px;
    position: relative;
    overflow: visible;
}
.publish-head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.publish-presets {
    margin-top: 4px;
    margin-bottom: 18px;
}
.publish-preset.active {
    background: #111827;
    color: #fff;
}
.publish-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.publish-form {
    gap: 14px;
}
.publish-row {
    display: grid;
    gap: 14px;
}
.publish-row-meta {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.2fr) auto;
    align-items: end;
}
.publish-row-source {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
}
.publish-row .field {
    min-width: 0;
}
.publish-row .field > input,
.publish-row .field > select {
    height: 44px;
}
.publish-toggle-field {
    display: grid;
    grid-template-rows: auto 44px;
    gap: 7px;
    align-content: end;
    justify-items: start;
    min-width: 0;
    max-width: none;
    width: auto;
}
.publish-inline-check {
    width: 22px;
    height: 22px;
    margin: 0 auto;
    accent-color: #111827;
    align-self: center;
    justify-self: start;
}
.publish-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.publish-notes {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
}
.publish-note + .publish-note {
    border-top: 0;
}
.publish-note {
    display: grid;
    gap: 6px;
    padding: 14px;
    background: var(--surface-soft);
}
.publish-note strong {
    font-size: 15px;
}
.publish-note span {
    color: var(--muted);
    line-height: 1.5;
}
.publish-checks {
    display: grid;
    gap: 10px;
    padding-top: 2px;
}
.publish-help-panel {
    position: fixed;
    top: 12px;
    right: 0;
    width: min(380px, calc(100vw - 18px));
    z-index: 60;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
    transform: translateX(calc(100% - 32px));
    transition: transform .2s ease;
    pointer-events: auto;
    filter: drop-shadow(0 4px 10px rgba(15, 23, 42, .12));
}
.publish-help-panel.is-open {
    transform: translateX(0);
}
.publish-help-toggle {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 0;
    background: #e5e7eb;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .1);
}
.publish-help-body {
    padding: 16px 18px 18px 16px;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(10px);
    box-shadow: none;
    border: 0;
    max-height: calc(100vh - 150px);
    overflow: auto;
}
.publish-help-body .section-head.compact {
    margin-bottom: 12px;
}

.reference-tree-panel {
    display: grid;
    gap: 18px;
}
.reference-tree-panel .section-head {
    margin-bottom: 0;
}
.reference-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.reference-tree-item {
    display: grid;
    gap: 6px;
}
.reference-tree-item > .reference-tree-row > a {
    display: inline-grid;
    gap: 2px;
    padding: 0;
    background: transparent;
    color: #111827;
}
.reference-tree-item > .reference-tree-row > a strong {
    font-size: 15px;
    line-height: 1.2;
}
.reference-tree-item > .reference-tree-row > a span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.reference-tree-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 3px 0;
}
.reference-tree-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.reference-tree-toggle span {
    display: inline-block;
    transition: transform .15s ease;
}
.reference-tree-item.expanded > .reference-tree-row .reference-tree-toggle span {
    transform: rotate(90deg);
}
.reference-tree-toggle-spacer {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}
.reference-tree-drag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: #9ca3af;
    cursor: grab;
    user-select: none;
}
.reference-tree-item.is-dragging {
    opacity: .5;
}
.reference-tree-item.is-drop-target > .reference-tree-row {
    outline: 2px solid rgba(15, 118, 110, .35);
    outline-offset: 2px;
}
.reference-tree-item.drop-before > .reference-tree-row {
    box-shadow: inset 0 2px 0 rgba(15, 118, 110, .55);
}
.reference-tree-item.drop-after > .reference-tree-row {
    box-shadow: inset 0 -2px 0 rgba(15, 118, 110, .55);
}
.reference-tree-item.drop-inside > .reference-tree-row {
    background: rgba(15, 118, 110, .08);
}
.reference-tree-item.active > .reference-tree-row > a strong {
    color: #0f766e;
}
.reference-tree-item.expanded > .reference-tree-row > a strong {
    color: #0f766e;
}
.reference-tree-children {
    list-style: none;
    margin: 0;
    padding: 0 0 0 18px;
    display: grid;
    gap: 8px;
    border-left: 1px solid rgba(17, 24, 39, .08);
}
.reference-tree-admin .reference-tree-children {
    display: none;
}
.reference-tree-admin .reference-tree-item.expanded > .reference-tree-children {
    display: grid;
}
.reference-tree-panel-aside {
    padding: 0;
    background: transparent;
    border: 0;
}
.reference-admin-layout {
    display: grid;
    grid-template-columns: minmax(150px, 170px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.reference-admin-tree-panel {
    position: sticky;
    top: 16px;
    align-self: start;
}
.reference-admin-main {
    display: grid;
    gap: 20px;
}
.reference-admin-editor,
.reference-admin-children {
    display: grid;
    gap: 18px;
}
.reference-editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.reference-page-headline {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.reference-page-headline h2 {
    margin: 0;
}
.reference-slug-inline {
    width: auto;
    min-width: 0;
    max-width: none;
    flex: 0 0 auto;
    display: inline-block;
    border: 0;
    border-bottom: 1px dotted currentColor;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
    padding: 0 0 1px;
    outline: none;
    box-sizing: content-box;
    white-space: nowrap;
    align-self: baseline;
    vertical-align: baseline;
}
.reference-slug-field {
    width: fit-content;
    min-width: 0;
    justify-self: start;
}
.reference-slug-field .reference-slug-inline {
    min-width: 0;
    max-width: none;
}
.reference-slug-field input {
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0 0 1px;
    border: 0;
    border-bottom: 1px dotted currentColor;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
}
.reference-slug-inline:focus,
.reference-slug-field input:focus {
    background: transparent;
    outline: none;
    box-shadow: none;
}
.reference-visibility-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    background: rgba(17, 24, 39, .05);
    color: #111827;
    cursor: pointer;
}
.reference-visibility-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.reference-visibility-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}
.reference-visibility-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}
.reference-visibility-toggle.is-public {
    color: #f59e0b;
    background: rgba(245, 158, 11, .12);
}
.reference-visibility-toggle.is-private {
    color: #64748b;
    background: rgba(100, 116, 139, .12);
}
.reference-visibility-toggle.is-public .reference-visibility-icon {
    opacity: 1;
}
.reference-visibility-toggle.is-private .reference-visibility-icon {
    opacity: .6;
}
.reference-visibility-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(2px);
    padding: 6px 8px;
    background: #111827;
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease;
    z-index: 20;
}
.reference-visibility-toggle:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.reference-delete-form {
    margin: 0;
}
.reference-delete-icon-btn {
    width: 36px;
    padding: 0;
}
.reference-delete-icon-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}
.reference-delete-icon-btn[data-tooltip] {
    position: relative;
}
.reference-delete-icon-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(2px);
    padding: 6px 8px;
    background: #111827;
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease;
    z-index: 20;
}
.reference-delete-icon-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.reference-admin-path {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}
.reference-glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.reference-glossary-item {
    background: rgba(255,255,255,.86);
    padding: 14px;
    display: grid;
    gap: 8px;
}
.reference-glossary-item h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
}
.reference-glossary-item p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
}
.reference-updated-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .01em;
}
.reference-detail-layout .detail-article-reference {
    display: grid;
    gap: 18px;
}
.reference-detail-layout .detail-article-reference .detail-media {
    margin-bottom: 0;
}
.table-wrap { overflow: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table th, .admin-table td {
    padding: 12px 10px;
    border-bottom: 0;
    vertical-align: top;
    text-align: left;
}
.admin-table tbody tr:nth-child(even) {
    background: rgba(17, 24, 39, .02);
}
.admin-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.moderation-toolbar {
    align-items: center;
    gap: 12px;
}
.moderation-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.moderation-bulk {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.moderation-bulk select {
    min-width: 170px;
}
.import-draft-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.import-draft-form select {
    min-width: 180px;
}
.profile-follow-form {
    margin-top: 6px;
}
.profile-network {
    margin-top: 24px;
}
.profile-network .activity-item a {
    color: inherit;
}
.moderation-table th:first-child,
.moderation-table td:first-child {
    width: 1%;
    white-space: nowrap;
}
.row-actions {
    align-items: flex-start;
}
.row-actions form { margin: 0; }
.form-admin {
    margin-top: 12px;
}
.resource-form-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.resource-form-tab {
    border: 0;
    height: 34px;
    padding: 0 12px;
    background: rgba(15, 23, 42, .08);
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.resource-form-tab.is-active {
    background: #111827;
    color: #fff;
}
.resource-form-tab[data-social-tab]:not(.is-configured):not(.is-active) {
    opacity: .55;
}
.resource-form-tab.is-configured {
    background: rgba(15, 118, 110, .13);
    color: #0f766e;
}
.resource-form-panel {
    display: none;
    gap: 12px;
}
.resource-form-panel.is-active {
    display: grid;
}
.social-networks {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.social-networks-title {
    font-size: 12px;
    color: #64748b;
    margin-right: 4px;
}
.social-network-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    background: rgba(15, 23, 42, .05);
    border: 1px solid transparent;
    cursor: pointer;
}
.social-network-pill input {
    margin: 0;
}
.social-network-pill:has(input:checked) {
    border-color: rgba(15, 118, 110, .35);
    background: rgba(15, 118, 110, .08);
}
.social-network-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
}
.social-network-icon-vk {
    background: #0077ff;
}
.social-network-icon-max {
    background: #111827;
}
.social-network-icon-telegram {
    background: #229ed9;
}
.field-social-flag {
    margin-top: 6px;
}
.social-empty-state {
    margin: 2px 0 0;
    padding: 10px 12px;
    background: rgba(148, 163, 184, .12);
    color: #334155;
    font-size: 13px;
    line-height: 1.45;
}
.social-empty-state.is-hidden {
    display: none;
}
.social-fields {
    display: none;
    gap: 12px;
}
.social-fields.is-active {
    display: grid;
}
.social-media-upload {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.social-media-upload input[type="file"] {
    max-width: 100%;
}

.section-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}
.section-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--accent);
}
.section-hero h1 {
    font-size: clamp(34px, 4.6vw, 58px);
    letter-spacing: -.04em;
}
.section-hero .lead {
    max-width: 60ch;
}
.section-hero-simple {
    grid-template-columns: 1fr;
}
.section-hero-side {
    min-width: 280px;
}
.section-kpi {
    flex: 1 1 0;
}
.section-hero-news-detail {
    align-items: stretch;
}
.news-detail-copy {
    align-content: start;
    min-width: 0;
}
.news-detail-topline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.news-detail-meta {
    gap: 8px 10px;
    min-width: 0;
}
.news-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.news-detail-meta .soft-tag {
    max-width: 100%;
    white-space: normal;
}
.news-detail-visual {
    display: grid;
    gap: 10px;
    align-content: start;
}
.detail-media-news {
    aspect-ratio: 4 / 3;
    margin-bottom: 0;
}
.news-detail-side-note {
    margin-top: 0;
}
.news-detail-layout {
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 14px;
}
.news-detail-aside {
    display: grid;
    gap: 14px;
}
.news-context-group {
    display: grid;
    gap: 12px;
}
.news-context-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.news-context-head h3 {
    margin: 4px 0 0;
    font-size: 18px;
    letter-spacing: -.02em;
}
.news-context-list {
    display: grid;
    gap: 10px;
}
.news-context-card {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    background: var(--surface-soft);
}
.news-context-card h4 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}
.news-context-card p {
    margin: 0;
    color: #374151;
    line-height: 1.55;
}
.news-context-card .story-foot {
    margin-top: 0;
    font-size: 12px;
}
.news-context-card a {
    color: inherit;
    font-weight: inherit;
}
.news-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .9fr);
    gap: 16px;
    align-items: start;
}
.news-column {
    display: grid;
    gap: 12px;
    align-content: start;
}
.news-column-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px;
}
.news-column-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -.03em;
    color: #111827;
}
.news-column-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.news-column-stack {
    display: grid;
    gap: 12px;
}
.news-cluster-stack {
    display: grid;
    gap: 18px;
}
.news-cluster {
    display: grid;
    gap: 16px;
    padding: 18px;
}
.news-cluster-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.news-cluster-head h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.04em;
}
.news-cluster-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.news-cluster-grid {
    display: grid;
    gap: 12px;
    align-items: start;
}
.news-cluster-grid-1 {
    grid-template-columns: minmax(0, 1fr);
}
.news-cluster-grid-2 {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.news-cluster-grid-3 {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .95fr) minmax(0, .9fr);
}
.news-cluster-column {
    display: grid;
    gap: 12px;
    align-content: start;
}
.news-featured-card,
.news-mini-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
}
.news-featured-card .story-media {
    margin-bottom: 0;
}
.news-featured-card h3,
.news-mini-card h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.22;
    letter-spacing: -.03em;
}
.news-featured-card p,
.news-mini-card p {
    margin: 0;
    color: #374151;
    line-height: 1.58;
}
.news-featured-card .story-foot,
.news-mini-card .story-foot {
    margin-top: 0;
}
.news-featured-card .story-foot {
    justify-content: flex-start;
}
.news-mini-card-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-soft);
}
.news-mini-card-media img,
.news-featured-card .story-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.news-cluster-column-text .news-mini-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-cluster-column-image .news-mini-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-detail-story-meta {
    justify-content: flex-start;
}
.news-detail-story-meta .inline-link {
    margin-left: 0;
}
.story-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.site-footer {
    padding: 8px 0 36px;
}
.site-footer .page-shell {
    width: min(1400px, calc(100% - 28px));
}
.site-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, .9fr) auto;
    gap: 18px;
    align-items: start;
    margin-top: 24px;
    padding: 20px 24px;
    border-radius: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    box-shadow: none;
}
.footer-brand strong {
    display: block;
    margin: 6px 0 8px;
    font-size: 18px;
    letter-spacing: -.02em;
}
.footer-brand strong,
.footer-links .footer-label,
.footer-meta strong {
    display: block;
    margin: 0 0 8px;
    font-size: 18px;
    letter-spacing: -.02em;
    color: #111827;
    font-weight: 800;
    text-transform: none;
}
.footer-brand p {
    margin: 0;
    max-width: 42ch;
    color: var(--muted);
    line-height: 1.6;
}
.footer-links {
    display: grid;
    gap: 10px;
}
.footer-label {
    margin-bottom: 0;
}
.footer-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: baseline;
    align-content: flex-start;
    line-height: 1.4;
}
.footer-line-break {
    flex-basis: 100%;
    height: 0;
}
.footer-link-list a {
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    display: inline-flex;
    align-items: baseline;
}
.footer-meta {
    display: grid;
    gap: 6px;
    justify-items: end;
    text-align: right;
}
.footer-meta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: baseline;
    align-content: flex-start;
    justify-content: flex-end;
    line-height: 1.4;
}
.footer-meta-links a {
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.4;
    display: inline-flex;
    align-items: baseline;
}
.footer-meta-links a:hover {
    color: #111827;
}
.footer-meta span {
    color: var(--muted);
    line-height: 1.5;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 0;
    color: var(--muted);
    font-size: 14px;
}
.pagination a {
    color: #111827;
    font-weight: 700;
}

.service-page {
    display: grid;
    gap: 14px;
}

.profile-stats {
    margin-top: 24px;
}

.soft-tag.is-active {
    background: rgba(17, 24, 39, .08);
    color: #111827;
}

@media (max-width: 1180px) {
    .hero, .two-col, .resource-layout, .publish-layout, .admin-shell {
        grid-template-columns: 1fr;
    }
    .news-detail-layout {
        grid-template-columns: 1fr;
    }
    .news-columns,
    .news-cluster-grid-3,
    .news-cluster-grid-2 {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: relative;
        width: auto;
        min-height: auto;
    }
    .tile-grid, .stat-grid, .story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .user-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .admin-links, .hero-stats, .publish-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .publish-row-meta,
    .publish-row-source {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .site-footer-inner {
        grid-template-columns: 1fr;
    }
    .footer-meta {
        justify-items: start;
        text-align: left;
    }
    .sidebar-user-widget {
        grid-template-columns: 34px minmax(0, 1fr);
    }
    .sidebar-logout-form {
        grid-column: 1 / -1;
    }
    .publish-help-panel {
        top: 12px;
        width: min(320px, calc(100vw - 14px));
    }
    .reference-admin-layout {
        grid-template-columns: 1fr;
    }
    .reference-admin-tree-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 18px, 100%);
    }
    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
    }
    .tile-grid, .stat-grid, .story-grid, .hero-stats, .admin-links, .hero-grid, .user-grid, .publish-grid {
        grid-template-columns: 1fr;
    }
    .publish-row-meta,
    .publish-row-source {
        grid-template-columns: 1fr;
    }
    .hero .hero-copy h1.hero-title-compact {
        font-size: 28px;
    }
    .section-hero h1 {
        font-size: 18px;
    }
    .news-detail-topline {
        align-items: flex-start;
    }
    .news-cluster-head,
    .news-column-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-link-list {
        gap: 8px;
    }
    .site-footer-admin {
        margin-top: 24px;
    }
    .sidebar-user-widget {
        grid-template-columns: 34px minmax(0, 1fr);
    }
    .sidebar-user-dropdown {
        left: 0;
        right: auto;
        min-width: 200px;
        max-width: calc(100vw - 36px);
    }
    .publish-help-panel {
        top: 8px;
        width: min(286px, calc(100vw - 12px));
    }
    .reference-admin-layout {
        grid-template-columns: 1fr;
    }
}
