.news-grid,.file-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.news-card,.file-card { min-width:0; background:#1d1d1d; border:1px solid #353535; border-radius:5px; overflow:hidden; }
.news-card { display:flex; flex-direction:column; }
.news-image-link { display:block; aspect-ratio:16/9; background:#171717; }
.news-image-link img { display:block; width:100%; height:100%; aspect-ratio:16/9; object-fit:cover; }
.news-card-body { padding:25px; flex:1; display:flex; flex-direction:column; }
.news-card-body p { color:#aaa; font-size:14px; flex:1; }
.news-card-body h3,.file-card h3 { overflow-wrap:anywhere; }
.news-card .text-link { align-self:start; }
.content-meta { display:flex; flex-wrap:wrap; gap:12px; font:11px monospace; color:#aaa; margin-bottom:18px; }
.content-meta span { color:#ffd400; }
.empty-state { grid-column:1/-1; padding:28px; border:1px dashed #444; color:#aaa; margin:0; border-radius:4px; }
.file-card { padding:25px; }
.file-card p { font-size:14px; color:#aaa; overflow-wrap:anywhere; }
.file-info { margin:20px 0; font-size:12px; }
.file-info div { display:flex; gap:15px; justify-content:space-between; padding:6px 0; border-bottom:1px solid #333; }
.file-info dt { color:#aaa; }
.file-info dd { margin:0; overflow-wrap:anywhere; }
.file-hash { margin-bottom:20px; color:#aaa; font-size:11px; }
.file-hash summary { cursor:pointer; }
.file-hash code { display:block; overflow-wrap:anywhere; margin-top:10px; color:#ddd; }
.pagination { display:flex; flex-wrap:wrap; gap:25px; margin-top:35px; }
.news-detail { max-width:850px; }
.news-detail h1 { margin-top:25px; overflow-wrap:anywhere; }
.news-detail .content-meta { margin-top:35px; }
.news-cover { display:block; width:auto; height:auto; max-width:min(100%,960px); max-height:420px; object-fit:contain; border-radius:5px; margin:30px auto; }
.article-body { margin:35px 0; line-height:1.9; font-size:17px; overflow-wrap:anywhere; }
.preview-notice { border-left:3px solid #ffd400; padding:15px; background:#1d1d1d; color:#ffd400; }
.error-page { min-height:50vh; }
.admin-column { width:min(780px,calc(100% - 48px)); margin:auto; }
.admin-column h1 { font-size:38px; }
.admin-column h2 { font-size:26px; }
.admin-top,.admin-record-actions { display:flex; flex-wrap:wrap; justify-content:space-between; gap:20px; align-items:center; }
.admin-tabs { display:flex; border-bottom:1px solid #444; gap:30px; margin:20px 0 35px; }
.admin-tabs a { padding:12px 0; }
.admin-tabs a[aria-current] { color:#ffd400; border-bottom:2px solid #ffd400; }
.admin-column label { margin-bottom:20px; }
.admin-column select { width:100%; color:#fff; background:#111; border:1px solid #444; padding:12px; margin-top:8px; border-radius:3px; font:inherit; }
.admin-column input[type=file] { white-space:normal; overflow:hidden; }
.small-form { background:transparent; padding:0; border:0; margin:0; }
.text-button { background:transparent; border:0; color:#ffd400; padding:5px 0; font-size:13px; }
.text-button.danger { color:#ffb4a8; }
.admin-thumbnail { max-width:200px; max-height:120px; object-fit:contain; margin:15px 0; }
.admin-list-title { margin-top:45px; }
.admin-list { display:grid; gap:15px; }
.admin-record { padding:20px; background:#171717; border:1px solid #353535; border-radius:5px; }
.admin-record h3 { overflow-wrap:anywhere; }
.admin-record-actions { justify-content:flex-start; }
.admin-preview { width:100%; height:850px; border:1px solid #ffd40055; margin-top:25px; background:#111; }
#turnstile-widget { min-width:0; width:calc(100% - 4px); padding:0; margin:15px 2px 0; }
#request-form,.request-grid > * { min-width:0; }
#turnstile-status { margin-bottom:18px; }
@media(max-width:1100px) { .header nav { gap:12px; font-size:12px; } .header-inner { gap:20px; } }
@media(max-width:900px) { .header-cta { display:none; } }
@media(max-width:850px) { .news-grid,.file-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
  .news-grid,.file-grid { grid-template-columns:1fr; }
  .admin-column { width:calc(100% - 36px); }
  .admin-column form:not(.small-form) { padding:20px; }
  .admin-column h1 { font-size:30px; }
  .admin-column .actions { flex-wrap:wrap; }
  .article-body { font-size:16px; }
  .news-card-body,.file-card { padding:22px; }
}
/* Compact first-party statistics inside the existing admin column. */
.stats-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.stats-card { padding:18px; background:#171717; border:1px solid #353535; border-top:2px solid #ffd40080; border-radius:5px; min-width:0; }
.stats-card h3 { font-size:16px; margin-bottom:15px; }
.stats-card dl { margin:0; }
.stats-card dl div + div { margin-top:12px; }
.stats-card dt { color:#aaa; font-size:11px; }
.stats-card dd { margin:0; color:#ffd400; font:700 28px/1.3 Arial,Helvetica,sans-serif; overflow-wrap:anywhere; }
.stats-note,.record-counter { color:#aaa; font-size:12px; line-height:1.7; }
.stats-note { margin-top:16px; }
.stats-section { margin-top:35px; }
.stats-section h3 { font-size:21px; }
.stats-chart { display:block; width:100%; height:160px; border-radius:4px; background:#171717; padding:12px; }
.stats-bar { fill:#ffd400; }
.stats-axis { stroke:#444; stroke-width:1; }
.chart-dates { display:flex; justify-content:space-between; margin-top:8px; font-size:11px; color:#aaa; }
.stats-chart-data { margin-top:16px; font-size:12px; }
.stats-chart-data summary { cursor:pointer; color:#ffd400; }
.stats-chart-data summary:focus-visible { outline:3px solid #ffd400; outline-offset:5px; }
.stats-table { width:100%; border-collapse:collapse; table-layout:fixed; background:#171717; font-size:13px; }
.stats-table th,.stats-table td { padding:14px; border-bottom:1px solid #333; vertical-align:top; overflow-wrap:anywhere; text-align:left; }
.stats-table thead th { color:#aaa; font-size:11px; font-weight:400; }
.stats-table tr> :last-child:not([colspan]) { width:105px; text-align:right; }
.stats-table tbody th { font-weight:400; }
.stats-table td:not([colspan]) { color:#ffd400; font-variant-numeric:tabular-nums; }
.stats-table small { display:block; color:#aaa; font-size:11px; margin-top:5px; overflow-wrap:anywhere; }
.stats-empty { color:#aaa; }
@media(max-width:600px) {
  .admin-tabs { gap:22px; font-size:14px; flex-wrap:wrap; }
  .stats-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stats-card { padding:16px; }
  .stats-table th,.stats-table td { padding:12px 10px; }
  .stats-table tr> :last-child:not([colspan]) { width:90px; }
}

.admin-tabs { flex-wrap:wrap; }
.request-unread { border-left:3px solid #ffd400; }
.request-detail { display:grid; grid-template-columns:180px minmax(0,1fr); margin:24px 0; }
.request-detail dt,.request-detail dd { padding:12px 0; border-bottom:1px solid #303030; margin:0; overflow-wrap:anywhere; }
.request-detail dt { color:#999; }
.request-detail dd { white-space:pre-wrap; }
.request-back { display:inline-block; margin-bottom:8px; }
.request-message { padding:22px; border:1px solid #383838; background:#171717; margin:24px 0; border-radius:4px; }
.request-message h3 { margin:0 0 16px; font-size:18px; }
.request-message p { white-space:pre-wrap; overflow-wrap:anywhere; margin:0; }
@media(max-width:600px) { .request-detail { grid-template-columns:1fr; } .request-detail dt { border:0; padding-bottom:0; font-size:12px; } .request-detail dd { padding-top:6px; } }
.request-excerpt { overflow-wrap:anywhere; color:#aaa; }

.header nav { font-size:15px; font-weight:600; color:#e5e5e5; }
.header nav .admin-header-link { color:#ffd400; }
.group-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-top:28px; }
.group-tile { min-width:0; padding:22px; background:#171717; border:1px solid #333; border-radius:4px; transition:border-color .2s; overflow-wrap:anywhere; }
.group-tile:hover,.group-tile:focus-visible { border-color:#ffd400; }
.group-tile h2 { font-size:20px; margin:14px 0 10px; }
.group-tile p { color:#aaa; font-size:13px; }
.group-icon { width:28px; height:28px; color:#ffd400; fill:none; stroke:currentColor; stroke-width:1.5; }
.upload-progress { margin-top:20px; }
.upload-progress progress { display:block; width:100%; height:12px; accent-color:#ffd400; margin:10px 0; }
@media(max-width:850px) { .group-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .group-grid { grid-template-columns:1fr; } }

.news-image-link img.small-preview { object-fit:scale-down; }

/* Reusable publication editor and external resource cards. */
.editor-toolbar { display:flex; flex-wrap:wrap; gap:6px; padding:10px; border:1px solid #444; background:#171717; }
.editor-toolbar[hidden], [data-editor-surface][hidden] { display:none; }
.editor-toolbar button,.resource-edit-row button { border:1px solid #555; border-radius:3px; padding:8px 10px; background:#222; color:#eee; cursor:pointer; min-height:40px; }
.editor-toolbar button[aria-pressed="true"],.editor-toolbar button:hover { color:#ffd400; border-color:#ffd400; }
.editor-toolbar button:disabled { opacity:.4; cursor:default; }
.content-editor .tiptap { min-height:260px; padding:18px; border:1px solid #444; border-top:0; background:#111; color:#eee; overflow-wrap:anywhere; }
.content-editor .tiptap:focus { outline:2px solid #ffd400; outline-offset:2px; }
.content-editor .tiptap p { margin:0 0 14px; }
.content-editor .tiptap h2,.article-body h2 { font-size:28px; margin:28px 0 16px; }
.content-editor .tiptap h3,.article-body h3 { font-size:22px; margin:22px 0 14px; }
.content-editor .tiptap a,.article-body a { color:#ffd400; text-decoration:underline; }
.content-editor .tiptap img,.article-body img { max-width:100%; height:auto; display:block; margin:20px 0; }
.content-editor .tiptap li,.article-body li { margin:8px 0; }
.content-editor .tiptap ul,.content-editor .tiptap ol,.article-body ul,.article-body ol { padding-left:28px; }
.resource-editor { margin:24px 0; border:1px solid #444; padding:16px; min-width:0; }
.resource-edit-row { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.resource-edit-row input { flex:1 1 180px; min-width:0; }
.resource-edit-row select { flex:1 1 140px; min-width:0; }
.additional-materials { margin:40px 0; border-top:1px solid #383838; padding-top:24px; }
.resource-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.resource-card { display:flex; align-items:center; gap:14px; padding:20px; background:#171717; border:1px solid #383838; border-radius:4px; color:#eee; overflow-wrap:anywhere; }
.resource-card:hover,.resource-card:focus-visible { border-color:#ffd400; }
.resource-card > span:nth-child(2) { flex:1; min-width:0; }
.resource-card small { display:block; color:#ffd400; margin-bottom:6px; }
.resource-icon { flex:none; width:28px; height:28px; color:#ffd400; fill:none; stroke:currentColor; stroke-width:1.7; }
@media(max-width:600px) { .resource-grid { grid-template-columns:1fr; } .editor-toolbar button { padding:8px; } .content-editor .tiptap { padding:12px; } }
.content-editor [hidden],.resource-editor [hidden] { display:none !important; }

/* Knowledge base uses the site's existing surfaces, typography and accents. */
.breadcrumbs { margin:0 0 24px; color:#aaa; font-size:13px; overflow-wrap:anywhere; }
.breadcrumbs ol { display:flex; flex-wrap:wrap; gap:8px; list-style:none; padding:0; margin:0; }
.breadcrumbs li+li:before { content:'›'; margin-right:8px; color:#ffd400; }
.breadcrumbs a:hover { color:#ffd400; }
.knowledge-categories { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:30px 0 46px; }
.knowledge-categories h2 { margin-top:0; }
.knowledge-categories small { color:#ffd400; }
.knowledge-latest { margin:32px 0 24px; }
.knowledge-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.knowledge-card { min-width:0; background:#171717; border:1px solid #383838; border-radius:4px; padding:24px; overflow-wrap:anywhere; }
.knowledge-card h2,.knowledge-card h3 { font-size:22px; line-height:1.35; margin:16px 0; }
.knowledge-card h2 a:hover,.knowledge-card h3 a:hover { color:#ffd400; }
.knowledge-card > p { color:#bbb; }
.knowledge-detail { max-width:880px; }
.knowledge-detail h1 { overflow-wrap:anywhere; }
.knowledge-detail .article-body { margin-top:32px; font-size:18px; line-height:1.8; overflow-wrap:anywhere; }
.knowledge-help { background:#171717; border:1px solid #444; border-left:3px solid #ffd400; padding:28px; margin:40px 0 28px; }
.knowledge-help h2 { font-size:24px; margin-top:0; }
.knowledge-help p { color:#bbb; margin:16px 0 24px; }
.article-body pre,.content-editor .tiptap pre { max-width:100%; overflow-x:auto; padding:18px; border:1px solid #383838; background:#0b0b0b; white-space:pre; tab-size:4; }
.article-body code,.content-editor .tiptap code { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:.9em; }
.article-body :not(pre)>code { color:#ffd400; overflow-wrap:anywhere; }
.content-editor .tiptap { white-space:pre-wrap; }
@media(max-width:1000px) { .knowledge-categories,.knowledge-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .knowledge-categories,.knowledge-grid { grid-template-columns:1fr; } .knowledge-card,.knowledge-help { padding:20px; } .knowledge-detail .article-body { font-size:16px; } }

/* Keep desktop navigation on one line; reuse the menu button when space is tight. */
@media(min-width:601px) {
  .header-inner { gap:20px; flex-wrap:nowrap; }
  .header .brand,.header nav,.header nav a,.header-cta { flex-shrink:0; white-space:nowrap; }
  .header nav { gap:20px; }
  .header nav a { position:relative; font-weight:600; }
  .header nav .admin-header-link { color:inherit; }
  .header nav a::after { content:""; position:absolute; left:0; right:0; bottom:-5px; height:1px; background:var(--yellow); transform:scaleX(0); transform-origin:left; transition:transform .16s; }
  .header nav a:is(:hover,:focus-visible,[aria-current]) { color:var(--yellow); }
  .header nav a:is(:hover,:focus-visible,[aria-current])::after { transform:scaleX(1); }
}
@media(min-width:601px) and (max-width:1279px) {
  .header-inner { position:relative; }
  .menu-toggle { display:flex; align-items:center; gap:12px; margin-left:auto; padding:8px 12px; background:transparent; color:#fff; border:1px solid #444; border-radius:3px; font-size:12px; }
  .menu-toggle span { color:#ffd400; }
  .header nav { position:absolute; top:100%; left:0; width:100%; margin:0; padding:12px 22px 20px; flex-direction:column; gap:0; background:#111; border-bottom:1px solid #444; }
  .header nav a { padding:10px 4px; }
  .header nav a::after { left:4px; right:4px; bottom:6px; }
  .js .header nav:not(.is-open) { display:none; }
}
