html,
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    --page-bg: #f4f2ee;
    --text: #181818;
    --muted: #675f55;
    --soft-muted: #746d62;
    --border: #d2cec4;
    --strong-border: #161616;
    --accent: #a73328;
    --media-bg: #1d3f43;
    --media-text: #f8f6f0;
    --header-rule: 3px;
    --lead-bg: transparent;
    --lead-padding: 0;
    --lead-border-color: var(--border);
    background: var(--page-bg);
    color: var(--text);
}

body.theme-gaceta {
    --page-bg: #f4f2ee;
    --text: #181818;
    --muted: #675f55;
    --soft-muted: #746d62;
    --border: #d2cec4;
    --strong-border: #161616;
    --accent: #a73328;
    --media-bg: #1d3f43;
}

body.theme-sports {
    --page-bg: #f2f5ef;
    --text: #111a15;
    --muted: #536255;
    --soft-muted: #657166;
    --border: #cbd8c8;
    --strong-border: #0e3322;
    --accent: #12753e;
    --media-bg: #103a2a;
    --header-rule: 4px;
}

body.theme-tv {
    --page-bg: #f5f5f3;
    --text: #131316;
    --muted: #5e5f68;
    --soft-muted: #6b6d77;
    --border: #ced2d8;
    --strong-border: #151a2d;
    --accent: #d32035;
    --media-bg: #151a2d;
    --lead-bg: #151a2d;
    --lead-padding: 16px;
    --lead-border-color: #151a2d;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-shell {
    margin: 0 auto;
    max-width: 1120px;
    padding: 28px 20px 56px;
}

.site-header {
    border-bottom: var(--header-rule) solid var(--strong-border);
    margin-bottom: 24px;
    padding-bottom: 20px;
}

.site-kicker {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.site-header h1 {
    font-size: clamp(2.25rem, 5vw, 4.25rem);
    line-height: 1;
    margin: 0;
}

.site-muted {
    color: var(--muted);
    margin: 16px 0 0;
}

.home-shell,
.listing-shell {
    max-width: 1180px;
}

.section-nav {
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 8px;
    margin: -8px 0 26px;
    overflow-x: auto;
    padding: 0 0 14px;
    scrollbar-width: thin;
}

.section-nav a {
    align-items: center;
    border: 1px solid var(--border);
    display: inline-flex;
    flex: 0 0 auto;
    gap: 8px;
    min-height: 38px;
    padding: 8px 11px;
}

.section-nav a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    text-decoration: none;
}

.section-nav span {
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
}

.section-nav small {
    color: var(--soft-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.section-nav a:hover small {
    color: inherit;
}

.category-header {
    align-items: end;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.category-summary {
    border-left: 4px solid var(--accent);
    min-width: 132px;
    padding: 4px 0 4px 14px;
}

.category-summary strong,
.category-summary span,
.category-summary small {
    display: block;
}

.category-summary strong {
    font-size: 2rem;
    line-height: 1;
}

.category-summary span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 5px;
    text-transform: uppercase;
}

.category-summary small {
    color: var(--soft-muted);
    font-size: 0.78rem;
    margin-top: 6px;
}

.empty-state {
    border: 1px solid var(--border);
    margin-bottom: 24px;
    padding: 20px;
}

.empty-state h2 {
    font-size: 1.25rem;
    margin: 0 0 6px;
}

.empty-state p {
    color: var(--muted);
    margin: 0;
}

.author-avatar {
    margin: 0 0 26px;
}

.author-avatar img {
    border: 1px solid var(--border);
    border-radius: 50%;
    height: 96px;
    object-fit: cover;
    width: 96px;
}

.lead-story {
    background: var(--lead-bg);
    border-bottom: 1px solid var(--lead-border-color);
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
    margin-bottom: 26px;
    padding: var(--lead-padding);
    padding-bottom: calc(var(--lead-padding) + 26px);
}

.lead-story-media,
.post-card-media {
    align-items: center;
    background: var(--media-bg);
    color: var(--media-text);
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.lead-story-media {
    aspect-ratio: 16 / 9;
}

.lead-story-media img,
.post-card-media img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.lead-story-media span,
.post-card-media span {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 12px;
    text-align: center;
    text-transform: uppercase;
}

.lead-story-copy {
    align-self: end;
    padding-bottom: 4px;
}

.lead-story h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.02;
    margin: 0 0 12px;
}

.post-category {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.lead-story time,
.post-card time {
    color: var(--soft-muted);
    font-size: 0.86rem;
}

.post-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-shell {
    gap: 28px;
}

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

.video-card {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.video-frame,
.video-fallback {
    aspect-ratio: 16 / 9;
    background: #111111;
    overflow: hidden;
}

.video-frame iframe {
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.video-fallback {
    color: #ffffff;
    display: block;
    position: relative;
}

.video-fallback img {
    height: 100%;
    object-fit: cover;
    opacity: .72;
    width: 100%;
}

.video-fallback span {
    bottom: 18px;
    font-weight: 700;
    left: 18px;
    position: absolute;
}

.video-copy h2 {
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    line-height: 1.08;
    margin: 0;
}

.video-copy time {
    color: var(--soft-muted);
    display: block;
    font-size: .92rem;
    margin-top: 10px;
}

.form-shell {
    max-width: 900px;
}

.contact-layout {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .75fr);
}

.contact-panel,
.public-form,
.public-action {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .46);
}

.contact-panel {
    padding: 20px;
}

.contact-panel h2 {
    font-size: 1.25rem;
    margin: 0 0 16px;
}

.contact-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.contact-list div {
    border-top: 1px solid var(--border);
    display: grid;
    gap: 4px;
    padding-top: 12px;
}

.contact-list dt {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.contact-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.contact-actions {
    align-content: start;
    display: grid;
    gap: 14px;
}

.public-action {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.public-action:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.public-action strong {
    font-size: 1.1rem;
}

.public-action span,
.form-note {
    color: var(--muted);
    line-height: 1.45;
}

.public-form {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.public-search-form {
    align-items: end;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: -8px 0 24px;
    padding-bottom: 18px;
}

.public-search-form label {
    display: grid;
    gap: 7px;
}

.public-search-form span {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.public-search-form input {
    border: 1px solid var(--border);
    color: var(--text);
    font: inherit;
    min-width: 0;
    padding: 11px 12px;
}

.public-search-form button {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 11px 16px;
}

.on-demand-section {
    display: grid;
    gap: 1rem;
}

.on-demand-header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.on-demand-header h2 {
    font-size: 1.35rem;
    margin: 0 0 .6rem;
}

.on-demand-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.on-demand-card {
    display: grid;
    gap: .55rem;
}

.on-demand-media {
    aspect-ratio: 16 / 9;
    background: #f2f2f2;
    display: block;
    overflow: hidden;
}

.on-demand-media img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.on-demand-card h3 {
    font-size: 1rem;
    line-height: 1.25;
    margin: 0;
}

.subscribe-form {
    max-width: 560px;
}

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

.public-form label {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.public-form label span {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.public-form input,
.public-form textarea {
    border: 1px solid var(--border);
    color: var(--text);
    font: inherit;
    min-width: 0;
    padding: 11px 12px;
}

.public-form textarea {
    resize: vertical;
}

.public-form-actions {
    align-items: center;
    display: flex;
    gap: 14px;
}

.turnstile-widget {
    min-height: 65px;
}

.public-form-actions button {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 11px 16px;
}

.public-form-actions a {
    color: var(--accent);
    font-weight: 700;
}

.public-alert {
    background: #fff0f0;
    border: 1px solid #e4b3b3;
    color: #8d1e1e;
    margin: 0 0 16px;
    padding: 12px 14px;
}

.public-alert.is-success {
    background: #eef8ef;
    border-color: #acd6b4;
    color: #146133;
}

.post-card {
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 12px;
    min-width: 0;
    padding-bottom: 18px;
}

.post-card-copy,
.post-card h2,
.post-card h2 a {
    min-width: 0;
    overflow-wrap: anywhere;
}

.post-card-media {
    aspect-ratio: 4 / 3;
}

.post-card h2 {
    font-size: 1.18rem;
    line-height: 1.18;
    margin: 0 0 8px;
}

.theme-gaceta .site-header {
    box-shadow: inset 0 -1px 0 var(--border);
}

.theme-sports .lead-story-media,
.theme-sports .post-card-media {
    border-bottom: 4px solid var(--accent);
}

.theme-sports .post-card h2 {
    font-weight: 800;
}

.theme-tv .site-header {
    border-bottom-color: var(--accent);
    padding-top: 6px;
}

.theme-tv .site-kicker {
    color: var(--accent);
}

.theme-tv .section-nav a {
    background: #fff;
}

.theme-tv .section-nav a:hover {
    background: var(--accent);
}

.theme-tv .lead-story {
    color: #f8f9fb;
}

.theme-tv .lead-story .post-category,
.theme-tv .lead-story time {
    color: #ffccd4;
}

.theme-tv .lead-story-media {
    background: #060812;
}

.theme-tv .post-card-media {
    aspect-ratio: 16 / 10;
}

.pager {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 24px;
}

.pager-link {
    border: 1px solid var(--strong-border);
    font-weight: 700;
    min-width: 116px;
    padding: 9px 12px;
    text-align: center;
}

.pager-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    text-decoration: none;
}

.pager-current {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
}

.article-shell {
    max-width: 820px;
}

.article-header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    padding-bottom: 20px;
}

.article-header h1 {
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    line-height: 1.02;
    margin: 8px 0 14px;
}

.article-meta {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 8px;
}

.article-meta time {
    color: var(--soft-muted);
    font-size: 0.95rem;
}

.article-extract {
    color: var(--muted);
    font-size: 1.18rem;
    line-height: 1.45;
    margin: 0;
}

.article-image {
    margin: 0 0 26px;
}

.article-image img {
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.media-fallback-applied {
    background: var(--media-bg);
}

.media-fallback-hidden {
    display: none !important;
}

.public-ad-slot {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin: 24px 0;
}

.public-ad-item {
    align-items: center;
    background: var(--media-bg);
    color: var(--media-text);
    display: flex;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
}

.public-ad-item:empty {
    display: none;
}

.public-ad-item a,
.public-ad-item img {
    display: block;
    max-width: 100%;
}

.public-ad-item img {
    height: auto;
}

.post-grid > .public-ad-slot {
    margin: 0;
    min-width: 0;
}

.post-grid > .public-ad-slot .public-ad-item {
    width: 100%;
}

.post-grid > .public-ad-slot img {
    object-fit: contain;
}

.public-ad-video iframe,
.public-ad-video video {
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
    max-width: 100%;
    width: min(720px, 100vw - 32px);
}

.article-image figcaption {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 8px;
}

.article-content {
    font-size: 1.08rem;
    line-height: 1.68;
    overflow-wrap: anywhere;
}

.article-content > :first-child {
    margin-top: 0;
}

.article-content > :last-child {
    margin-bottom: 0;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content table,
.article-content figure,
.article-content iframe,
.article-content video {
    margin-bottom: 1.25rem;
}

.article-content a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    line-height: 1.18;
    margin: 2rem 0 0.8rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.3rem;
}

.article-content li + li {
    margin-top: 0.35rem;
}

.article-content blockquote {
    border-left: 4px solid var(--accent);
    color: var(--muted);
    font-size: 1.12rem;
    margin-left: 0;
    padding: 0.2rem 0 0.2rem 1rem;
}

.article-content table {
    border-collapse: collapse;
    display: block;
    max-width: 100%;
    overflow-x: auto;
    width: max-content;
}

.article-content th,
.article-content td {
    border: 1px solid var(--border);
    padding: 0.55rem 0.7rem;
    vertical-align: top;
}

.article-content th {
    background: #eee9df;
    font-weight: 700;
}

.article-content img,
.article-content iframe,
.article-content video,
.article-content embed,
.article-content object {
    max-width: 100%;
}

.article-content img {
    display: block;
    height: auto;
    margin: 1.5rem auto;
}

.article-content iframe {
    background: #000;
    border: 0;
    display: block;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 260px;
    width: 100%;
}

.article-content video {
    display: block;
    height: auto;
    width: 100%;
}

.article-content .image,
.article-content .media,
.article-content .embed,
.article-content .video,
.article-content .youtube,
.article-content .facebook,
.article-content .twitter-tweet,
.article-content .instagram-media {
    max-width: 100%;
}

.article-content .twitter-tweet,
.article-content .instagram-media {
    margin-left: auto !important;
    margin-right: auto !important;
}

.article-content img[align="left"],
.article-content .align-left,
.article-content .pull-left {
    float: left;
    margin: 0.35rem 1.25rem 1rem 0;
    max-width: min(320px, 45%);
}

.article-content img[align="right"],
.article-content .align-right,
.article-content .pull-right {
    float: right;
    margin: 0.35rem 0 1rem 1.25rem;
    max-width: min(320px, 45%);
}

.article-content::after {
    clear: both;
    content: "";
    display: table;
}

.related-section {
    border-top: 3px solid var(--strong-border);
    margin-top: 42px;
    padding-top: 18px;
}

.related-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.related-header .site-kicker {
    margin: 0;
}

.related-header a {
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 700;
}

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

.related-card {
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 12px;
    grid-template-columns: 120px 1fr;
    padding-bottom: 14px;
}

.related-card-media {
    align-items: center;
    aspect-ratio: 4 / 3;
    background: var(--media-bg);
    color: var(--media-text);
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.related-card-media img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.related-card-media span {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 8px;
    text-align: center;
    text-transform: uppercase;
}

.related-card h2 {
    font-size: 1rem;
    line-height: 1.2;
    margin: 0 0 8px;
}

.related-card time {
    color: var(--soft-muted);
    font-size: 0.82rem;
}

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.admin-shell {
    background: #f6f7f9;
    color: #18202a;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    background: #101820;
    color: #f7fafc;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 18px;
}

.admin-brand {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
}

.admin-sidebar a,
.admin-sidebar button {
    background: transparent;
    border: 0;
    color: #dce5ef;
    font: inherit;
    padding: 8px 0;
    text-align: left;
    text-decoration: none;
}

.admin-sidebar button {
    cursor: pointer;
}

.admin-main {
    padding: 32px;
}

.admin-header {
    margin: 0 0 24px;
}

.admin-header h1 {
    font-size: 2rem;
    margin: 0 0 8px;
}

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

.admin-panel {
    background: #ffffff;
    border: 1px solid #dbe1e8;
    border-radius: 8px;
    padding: 18px;
}

.admin-panel h2 {
    font-size: 1.05rem;
    margin: 0 0 8px;
}

.admin-panel p {
    color: #526173;
    margin: 0;
}

.admin-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.admin-panel-actions a,
.admin-button-link {
    background: #edf4ff;
    border: 1px solid #bdd4ff;
    border-radius: 6px;
    color: #174ea6;
    font-weight: 700;
    padding: 9px 12px;
    text-decoration: none;
}

.admin-toolbar {
    align-items: end;
    background: #ffffff;
    border: 1px solid #dbe1e8;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 18px;
    padding: 14px;
}

.admin-toolbar label,
.admin-form label {
    color: #526173;
    display: grid;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 6px;
    min-width: 180px;
}

.admin-toolbar input,
.admin-toolbar select,
.admin-form input,
.admin-form select,
.admin-form textarea {
    border: 1px solid #bfccd9;
    border-radius: 6px;
    color: #18202a;
    font: inherit;
    padding: 10px 12px;
}

.admin-toolbar button,
.admin-form button {
    background: #1f6feb;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 11px 14px;
}

.admin-table-wrap {
    background: #ffffff;
    border: 1px solid #dbe1e8;
    border-radius: 8px;
    overflow-x: auto;
}

.admin-table {
    border-collapse: collapse;
    min-width: 780px;
    width: 100%;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #e7ecf2;
    padding: 13px 14px;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: #526173;
    font-size: 0.76rem;
    text-transform: uppercase;
}

.admin-table small {
    color: #6b7788;
    display: block;
    margin-top: 4px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    white-space: nowrap;
}

.admin-actions a,
.admin-pager a,
.admin-form-actions a,
.admin-form-actions button {
    color: #174ea6;
    font-weight: 700;
    text-decoration: none;
}

.admin-form-actions button {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.admin-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 9px;
}

.admin-badge.is-live {
    background: #e8f7ed;
    color: #17663a;
}

.admin-badge.is-muted {
    background: #edf0f4;
    color: #526173;
}

.admin-pager {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    margin-top: 16px;
}

.admin-form {
    background: #ffffff;
    border: 1px solid #dbe1e8;
    border-radius: 8px;
    display: grid;
    gap: 16px;
    max-width: 820px;
    padding: 18px;
}

.admin-related-panel {
    margin-top: 18px;
    max-width: 820px;
}

.admin-site-list {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.admin-site-list li {
    border-top: 1px solid #e7ecf2;
    display: grid;
    gap: 2px;
    padding-top: 8px;
}

.admin-site-list span {
    color: #526173;
}

.admin-form-wide {
    max-width: 1040px;
}

.admin-form-card {
    border: 1px solid #e7ecf2;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.admin-form-card h2 {
    color: #18202a;
    font-size: 1rem;
    margin: 0;
}

.admin-form-card-wide {
    gap: 16px;
}

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

.admin-form label {
    min-width: 0;
}

.admin-form textarea {
    resize: vertical;
}

.admin-code-area {
    font-family: Consolas, Monaco, "Courier New", monospace !important;
    line-height: 1.5;
}

.admin-rich-editor {
    border: 1px solid #bfccd9;
    border-radius: 8px;
    overflow: hidden;
}

.admin-editor-toolbar {
    align-items: center;
    background: #f7f9fc;
    border-bottom: 1px solid #dbe1e8;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
}

.admin-editor-toolbar button {
    background: #ffffff;
    border: 1px solid #bfccd9;
    border-radius: 6px;
    color: #18202a;
    min-width: 38px;
    padding: 7px 9px;
}

.admin-editor-toolbar button:hover {
    border-color: #1f6feb;
    color: #174ea6;
}

.admin-editor-surface {
    background: #ffffff;
    color: #18202a;
    line-height: 1.65;
    min-height: 360px;
    outline: none;
    overflow-wrap: anywhere;
    padding: 16px;
}

.admin-editor-surface:focus {
    box-shadow: inset 0 0 0 2px #bdd4ff;
}

.admin-editor-surface img {
    display: block;
    height: auto;
    margin: 14px 0;
    max-width: 100%;
}

.admin-editor-source[hidden],
.admin-editor-surface[hidden] {
    display: none;
}

.admin-image-preview {
    align-items: center;
    border: 1px solid #dbe1e8;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 160px minmax(0, 1fr);
    padding: 10px;
}

.admin-image-preview img {
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    object-fit: cover;
    width: 100%;
}

.admin-image-preview span {
    color: #526173;
    overflow-wrap: anywhere;
}

.admin-preview-shell {
    background: #ffffff;
    border: 1px solid #dbe1e8;
    border-radius: 8px;
    max-width: 960px;
}

.admin-check {
    align-items: center;
    display: flex !important;
    flex-direction: row;
    gap: 8px !important;
}

.admin-check input {
    height: 18px;
    width: 18px;
}

.admin-form-actions {
    align-items: center;
    display: flex;
    gap: 14px;
}

.admin-detail-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1040px;
}

.admin-detail-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.admin-detail-list div {
    border-top: 1px solid #e7ecf2;
    display: grid;
    gap: 4px;
    padding-top: 10px;
}

.admin-detail-list dt {
    color: #526173;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-detail-list small {
    color: #6b7788;
    display: block;
    margin-top: 3px;
}

.admin-message-panel {
    margin-top: 16px;
    max-width: 1040px;
}

.admin-message-panel p {
    color: #18202a;
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.admin-notice {
    background: #e8f7ed;
    border: 1px solid #b9e6c8;
    border-radius: 6px;
    color: #17663a;
    margin: 0 0 16px;
    padding: 10px 12px;
}

.admin-login-shell {
    align-items: center;
    background: #f6f7f9;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.admin-login-form {
    background: #ffffff;
    border: 1px solid #dbe1e8;
    border-radius: 8px;
    display: grid;
    gap: 16px;
    max-width: 420px;
    padding: 24px;
    width: 100%;
}

.admin-login-form h1 {
    font-size: 1.75rem;
    margin: 0;
}

.admin-login-form label {
    display: grid;
    gap: 6px;
}

.admin-login-form input {
    border: 1px solid #bfccd9;
    border-radius: 6px;
    font: inherit;
    padding: 10px 12px;
}

.admin-login-form button {
    background: #1f6feb;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    padding: 11px 14px;
}

.admin-alert {
    background: #fff0f0;
    border: 1px solid #ffc9c9;
    border-radius: 6px;
    color: #9b1c1c;
    margin: 0;
    padding: 10px 12px;
}

@media (max-width: 640px) {
    .site-shell {
        padding: 22px 16px 44px;
    }

    .lead-story,
    .post-grid,
    .video-grid,
    .contact-layout,
    .form-row,
    .public-search-form {
        grid-template-columns: 1fr;
    }

    .category-header {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .category-summary {
        border-left: 0;
        border-top: 3px solid var(--accent);
        display: grid;
        gap: 8px;
        grid-template-columns: auto 1fr;
        min-width: 0;
        padding: 12px 0 0;
    }

    .category-summary small {
        grid-column: 1 / -1;
    }

    .lead-story {
        gap: 16px;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .post-card-media {
        aspect-ratio: 16 / 9;
    }

    .post-card h2 {
        font-size: 1rem;
    }

    .pager {
        align-items: stretch;
        flex-direction: column;
    }

    .pager-current {
        order: -1;
        text-align: center;
    }

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

    .related-grid {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        padding: 18px;
    }

    .admin-main {
        padding: 22px 16px 44px;
    }

    .admin-grid,
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-image-preview {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 920px) {
    .lead-story,
    .post-grid,
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lead-story-media {
        grid-column: 1 / -1;
    }
}
