/*
 * "Moderna" forum theme: site chrome and forum patterns (wave 10). Needs tokens.css and components.css first.
 * Guide: docs/design/README.md. Live styleguide: /stil/. Page-specific CSS of later ports goes in
 * www/assets/modern/<area>.css; shared patterns belong here or in components.css (change request to the coordinator).
 *
 * Contents: base type, site header, ad slots, page frame (container, split), page intro, featured topics, board list,
 * topic list, side cards, post body (quote, code, signature), notice box, footer, redirect page, responsive.
 */

/* ---- base: the forum reads at 15px; posts at 16px ---- */
html { scroll-padding-top: calc(var(--header-h) + 12px); }
body { font-size: var(--fs-md); line-height: var(--lh); min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; padding: var(--space-6) 0 var(--space-12); }
.site-main:focus { outline: none; }
.container { width: 100%; max-width: var(--page-w); margin: 0 auto; padding: 0 var(--space-6); }
h1 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
/* text on filled accent: white in light, near-black in dark (AA); the admin still uses white */
.btn-primary, .btn-primary:hover, .btn-danger:hover, .page.current { color: var(--on-accent); }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---- site header: the admin sidebar's dark chrome, as a sticky bar ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--chrome-bg); color: var(--chrome-text);
  border-bottom: 1px solid var(--chrome-line);
}
.site-header-bar {
  display: flex; align-items: center; gap: var(--space-4);
  max-width: var(--page-w); height: var(--header-h); margin: 0 auto; padding: 0 var(--space-6);
}
.site-logo { display: flex; align-items: baseline; gap: 10px; color: var(--chrome-strong); flex: none; }
.site-logo:hover { text-decoration: none; }
.site-logo-mark {
  font-family: var(--mono); font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--chrome-strong);
  padding: 2px 8px; border-radius: var(--radius-sm); background: var(--accent);
}
.site-logo-name { font-size: var(--fs-sm); color: var(--chrome-text); font-weight: 500; }
.site-nav { display: flex; gap: 2px; }
.site-nav a {
  position: relative; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--chrome-text); font-size: var(--fs-base); font-weight: 550; white-space: nowrap;
}
.site-nav a:hover { background: var(--chrome-hover); color: var(--chrome-strong); text-decoration: none; }
.site-nav a[aria-current] { color: var(--chrome-strong); background: var(--chrome-active); box-shadow: inset 0 -2px 0 var(--accent); }
.site-search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.site-search .icon { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--chrome-text); pointer-events: none; }
.site-search input[type=search] {
  height: 36px; min-height: 36px; padding: 0 34px; font-size: var(--fs-base);
  background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); color: var(--chrome-strong);
}
.site-search input[type=search]::placeholder { color: var(--chrome-text); opacity: 1; }
.site-search input[type=search]:focus { background: var(--surface); color: var(--text); border-color: var(--link); }
.site-search input[type=search]:focus ~ kbd { display: none; }
.site-search kbd {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 4px; padding: 0 5px;
  color: var(--chrome-text); font-size: 11px; line-height: 17px;
}
.site-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.tool-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--radius-sm);
  color: var(--chrome-text); cursor: pointer;
}
.tool-btn:hover, .dropdown[open] > .tool-btn { background: var(--chrome-hover); color: var(--chrome-strong); text-decoration: none; }
.tool-btn:focus-visible { outline-color: var(--chrome-strong); }
.tool-count { position: absolute; top: 2px; right: 0; }
.tool-search { display: none; }
.user-btn { padding: 0 6px 0 4px; }
.user-btn-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--chrome-strong); font-weight: 550; font-size: var(--fs-base); }
.site-header .avatar { background: var(--accent); color: var(--on-accent); }
.site-signin { color: var(--chrome-strong); }
.site-signin:hover { background: var(--chrome-hover); }
.dropdown-list .count { margin-left: auto; }
.scheme-form { display: grid; gap: 0; }
.scheme-form button[aria-pressed="true"] { color: var(--accent); font-weight: 600; }
.scheme-form button[aria-pressed="true"] .icon { color: var(--accent); }

.imp-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px;
  padding: 8px 16px; background: #c2410c; color: #fff; font-weight: 500;
}
.imp-strip form { margin: 0; }

/* ---- ad slots: a quiet band under the header, labelled for screen readers ---- */
.ad-band { background: var(--surface-2); border-bottom: 1px solid var(--border); padding: var(--space-3) 0; }
.ad-band-bottom { border-top: 1px solid var(--border); border-bottom: 0; margin-top: var(--space-8); }
.ad-band .container { display: grid; gap: var(--space-3); justify-items: center; }
.ad-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.ad-band { overflow: hidden; }
.ad-slot, .ad-cell { max-width: 100%; overflow: hidden; text-align: center; }
.ad-cell img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.ad-slot table { margin: 0 auto; }

/* ---- page frame ---- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-6); align-items: start; }
.split-aside { display: grid; gap: var(--space-4); }
.split-aside .card { margin: 0; }
.section { margin-bottom: var(--space-8); }
.section-head { margin-bottom: var(--space-3); }
.section-head h2 { font-size: var(--fs-lg); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

.page-intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.page-intro .lead { margin: 6px 0 0; max-width: 70ch; }
.page-intro-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- featured topics (front page) ---- */
.feature-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.feature { padding: 14px 18px; border-top: 1px solid var(--border); }
.feature-group {
  padding: 8px 18px; border-top: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); font-size: var(--fs-sm); font-weight: 650;
}
.feature-list > :first-child { border-top: 0; border-radius: var(--radius) var(--radius) 0 0; }
.feature-title { display: block; color: var(--text); font-size: var(--fs-md); font-weight: 650; line-height: var(--lh-tight); }
.feature-title:hover { color: var(--link); text-decoration: none; }
.feature-title:visited { color: var(--text-2); }
.feature-excerpt {
  margin: 6px 0 0; color: var(--text-2); font-size: var(--fs-base); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word;
}
.feature-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 8px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.feature-meta a { color: var(--text-2); }
.feature-meta .avatar { margin-right: -4px; }
.feature-compact { padding-top: 10px; padding-bottom: 10px; }
.feature-compact .feature-title { font-weight: 550; font-size: var(--fs-base); }
.feature-compact .feature-meta { margin-top: 4px; }
.feature-compact .feature-meta .avatar { display: none; }
.meta-sep { display: inline-flex; align-items: center; gap: 4px; }
.danger-link { color: var(--danger) !important; }

/* ---- board list (front page, category page) ---- */
.cat-jump { margin-bottom: var(--space-4); }
.cat-block { padding: 0; overflow: hidden; }
.cat-head {
  display: grid; grid-template-columns: minmax(0, 1fr) 72px 84px 220px; gap: var(--space-4); align-items: baseline;
  padding: 12px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.cat-head h3 { font-size: var(--fs-md); }
.cat-head h3 a { color: var(--text); }
.cat-cols { display: contents; font-size: var(--fs-xs); font-weight: 600; }
.cat-cols span { text-align: right; }
.cat-cols span:last-child { text-align: left; }
.board-rows { list-style: none; margin: 0; padding: 0; }
.board-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 72px 84px 220px; gap: var(--space-4); align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--border);
}
.board-row:first-child { border-top: 0; }
.board-row:hover { background: var(--surface-2); }
.board-name { color: var(--text); font-weight: 650; }
.board-name:hover { color: var(--link); }
.board-desc { margin: 2px 0 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; }
.board-subs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 6px 0 0; font-size: var(--fs-xs); }
.board-subs a {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-weight: 500;
}
.board-subs a:hover { background: var(--link-soft); border-color: color-mix(in srgb, var(--link) 35%, transparent); color: var(--link); text-decoration: none; }
.board-subs a::before { content: "\21B3\00a0"; color: var(--muted); }
.board-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.board-num strong { color: var(--text); font-weight: 600; }
.board-num-label { display: none; }
.board-latest { display: flex; flex-direction: column; min-width: 0; font-size: var(--fs-sm); }
.board-latest-title { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.board-latest .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- board page head ---- */
.board-head { margin-bottom: var(--space-4); }
.board-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.board-head-desc { margin: 6px 0 0; max-width: 75ch; }
.board-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.subforums { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: var(--space-4); font-size: var(--fs-sm); }
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: var(--space-3); font-size: var(--fs-sm); }

/* ---- topic list: a table on wide screens, stacked rows on phones ---- */
.topic-table { padding: 0; overflow: hidden; }
.topic-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 76px 76px 170px; gap: var(--space-4); align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--border);
}
.topic-row-head {
  border-top: 0; padding-top: 9px; padding-bottom: 9px; background: var(--surface-2);
  color: var(--muted); font-size: var(--fs-xs); font-weight: 600;
}
.topic-row:not(.topic-row-head):hover { background: var(--surface-2); }
.topic-col-main { display: flex; gap: 12px; min-width: 0; }
.topic-col-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.topic-row-head .topic-col-num { color: var(--muted); }
.topic-col-last { min-width: 0; font-size: var(--fs-sm); }
.topic-dot { flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: transparent; }
.is-unread .topic-dot { background: var(--unread); }
.topic-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.topic-title { color: var(--text); font-weight: 500; word-break: break-word; }
.is-unread .topic-title { font-weight: 700; }
.topic-title:visited { color: var(--text-2); }
.topic-title:hover { color: var(--link); text-decoration: none; }
.topic-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.topic-badges:empty { display: none; }
.topic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; width: 100%; color: var(--muted); font-size: var(--fs-sm); }
.topic-meta a { color: var(--text-2); }
.topic-pages { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.topic-pages a {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: var(--fs-xs); font-variant-numeric: tabular-nums;
}
.topic-pages a:hover { background: var(--link-soft); border-color: color-mix(in srgb, var(--link) 35%, transparent); color: var(--link); text-decoration: none; }
.topic-pages .gap { padding: 0 2px; }
.topic-mobile-stats { display: none; align-items: center; gap: 4px; }
.topic-last-link { display: flex; flex-direction: column; color: var(--text-2); }
.topic-last-link:hover { text-decoration: none; }
.topic-last-link:hover .topic-last-when { text-decoration: underline; }
.topic-last-when { color: var(--text); }
.topic-last-who { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-pinned { background: color-mix(in srgb, var(--info-soft) 45%, transparent); }
.pager { justify-content: center; gap: 12px; margin-top: var(--space-4); }
.pager .btn .icon { width: 14px; height: 14px; }
@media (max-width: 520px) { .pager { gap: 6px; } .pager .pages { gap: 3px; } .pager > .btn { padding: 0; min-width: 36px; } }

/* ---- side cards ---- */
.side-card { padding: 16px 18px; }
.side-title { font-size: var(--fs-base); margin-bottom: 10px; }
.side-sub { font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; margin: 14px 0 6px; }
.side-note { font-size: var(--fs-sm); margin: 10px 0 0; color: var(--text-2); }
.side-card .kv li { font-size: var(--fs-base); }
.side-card .kv strong { font-variant-numeric: tabular-nums; }
.side-card .segmented { display: flex; }
.side-card .segmented a { flex: 1; justify-content: center; padding: 0 6px; }
.tab-panel-title { font-size: var(--fs-sm); color: var(--text-2); margin: 0 0 6px; }
.js [data-tabs] .tab-panel-title { display: none; }
.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; display: grid; gap: 2px; }
.rank-list li { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; font-size: var(--fs-base); counter-increment: rank; }
.rank-list li::before { content: counter(rank); flex: none; width: 1.4em; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; text-align: right; }
.rank-list a { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list a .avatar { margin-right: 8px; vertical-align: middle; }
.rank-count { flex: none; padding: 0 7px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-size: var(--fs-xs); font-weight: 700; line-height: 18px; font-variant-numeric: tabular-nums; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.people a { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: var(--fs-base); }
.dl-compact { grid-template-columns: minmax(100px, 40%) 1fr; font-size: var(--fs-sm); }

/* ---- post body (W36 builds the topic page on these) ---- */
.post-body { font-size: var(--fs-post); line-height: var(--lh-post); max-width: var(--read-w); word-wrap: break-word; overflow-wrap: anywhere; }
.post-body p { margin: 0 0 .9em; }
.post-body img { max-width: 100%; height: auto; }
.post-body iframe, .post-body video, .post-body embed { display: block; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.post-body a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); text-underline-offset: 2px; }
.post-body a:hover { text-decoration-color: currentColor; }
/* external links in post text carry a small arrow (not on image links) */
.post-body a[href^="http"]:not([href*="elitesecurity.org"]):not([href*="elitemadzone.org"]):not(:has(img))::after,
.legacy-body .post_text a[href^="http"]:not([href*="elitesecurity.org"]):not([href*="elitemadzone.org"]):not(:has(img))::after {
  content: "\2197"; display: inline-block; margin-left: 2px; font-size: .78em; color: var(--muted); text-decoration: none;
}
.post-body blockquote, .quote {
  margin: .6em 0 1em; padding: 10px 14px; background: var(--quote-bg); border-left: 3px solid var(--quote-line);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-2); font-size: var(--fs-md);
}
.quote-head { display: block; margin-bottom: 4px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.post-body pre, .code-block {
  margin: .6em 0 1em; padding: 12px 14px; background: var(--code-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; line-height: 1.55; overflow-x: auto; white-space: pre; word-break: normal;
}
.post-body code { padding: 1px 5px; border-radius: var(--radius-xs); background: var(--code-bg); font-size: .88em; }
.post-body pre code { padding: 0; background: none; font-size: inherit; }
.post-body mark, .hl { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
.post-sig { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px dashed var(--border); color: var(--muted); font-size: var(--fs-sm); }

/* ---- prose: long static text (rules, about) in a card ---- */
.prose { font-size: var(--fs-post); line-height: var(--lh-post); }
.prose > * { max-width: var(--read-w); }
.prose p { margin: 0 0 .9em; }
.prose h3 { margin: 1.4em 0 .5em; font-size: var(--fs-lg); }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.prose li { margin: .25em 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 1.4em 0; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); text-underline-offset: 2px; }

/* ---- user card (topic page aside of a post, profile hover) ---- */
.user-card { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-card-name { font-weight: 650; color: var(--text); }
.user-card-meta { color: var(--muted); font-size: var(--fs-xs); }

/* ---- notice box (UhOh, info) ---- */
.notice-box {
  display: flex; gap: 14px; max-width: 680px; margin: var(--space-8) auto; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.notice-box > .icon { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.notice-error { border-top: 4px solid var(--danger); }
.notice-error > .icon { color: var(--danger); }
.notice-info { border-top: 4px solid var(--info); }
.notice-info > .icon { color: var(--info); }
.notice-title { font-size: var(--fs-lg); margin-bottom: 6px; }
.notice-text { color: var(--text-2); }
.notice-actions { display: flex; gap: 8px; margin: 14px 0 0; }

/* ---- footer ---- */
.site-footer { margin-top: auto; background: var(--surface); border-top: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-sm); }
.site-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--space-6); padding-top: var(--space-8); padding-bottom: var(--space-6); }
.site-footer h2 { font-size: var(--fs-sm); color: var(--text); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--link); }
.site-footer p { margin: 0 0 8px; }
.footer-online-count strong { color: var(--text); font-variant-numeric: tabular-nums; }
.footer-online-list summary { display: flex; align-items: center; min-height: 36px; cursor: pointer; color: var(--link); }
.online-names { margin: 8px 0; max-height: 160px; overflow: auto; line-height: 1.7; }
.site-footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-top: var(--space-4); padding-bottom: var(--space-6); border-top: 1px solid var(--border); color: var(--muted); }
.site-footer-base p { margin: 0; }
.footer-sites { display: flex; gap: 12px; }

/* ---- redirect page ---- */
.redirect-page { display: grid; place-items: center; padding: var(--space-6); }
.redirect-card { max-width: 480px; text-align: center; font-size: var(--fs-md); }

/* ---- styleguide page (/stil/) ---- */
.sg-nav { position: sticky; top: calc(var(--header-h) + var(--space-4)); }
.sg-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sg-nav a { display: block; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-size: var(--fs-sm); }
.sg-nav a:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.sg-section { margin-bottom: var(--space-8); scroll-margin-top: calc(var(--header-h) + 16px); }
.sg-section > h2 { margin-bottom: 4px; }
.sg-section > p { margin: 0 0 var(--space-4); color: var(--text-2); max-width: 75ch; }
.sg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sg-swatch { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); font-size: var(--fs-xs); }
.sg-swatch-chip { height: 44px; border-bottom: 1px solid var(--border); }
.sg-swatch code { display: block; padding: 6px 8px; font-size: 11.5px; color: var(--text-2); }
.sg-type > * { margin: 0 0 8px; }
.sg-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.sg-icons figure { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 12px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.sg-icons figcaption { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.sg-icons .icon { width: 22px; height: 22px; }
.sg-demo-dropdown { position: static; }
.sg-demo-dropdown .dropdown-list { position: static; display: block; box-shadow: var(--shadow-md); }
.sg-space { display: grid; gap: 6px; }
.sg-space div { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); color: var(--muted); }
.sg-radius { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.sg-radius figure { margin: 0; display: grid; gap: 6px; font-size: var(--fs-xs); color: var(--text-2); }
.sg-radius-box { display: block; height: 56px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.sg-space span { display: block; height: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 2px; }

.sg-split .split-aside { align-self: stretch; align-content: start; }
.sg-nav { align-self: start; }
.sg-reply { margin-top: var(--space-4); }
.sg-c-bg { background: var(--bg); }
.sg-c-surface { background: var(--surface); }
.sg-c-surface-2 { background: var(--surface-2); }
.sg-c-border { background: var(--border); }
.sg-c-border-strong { background: var(--border-strong); }
.sg-c-text { background: var(--text); }
.sg-c-text-2 { background: var(--text-2); }
.sg-c-muted { background: var(--muted); }
.sg-c-accent { background: var(--accent); }
.sg-c-accent-soft { background: var(--accent-soft); }
.sg-c-link { background: var(--link); }
.sg-c-link-soft { background: var(--link-soft); }
.sg-r-radius-xs { border-radius: var(--radius-xs); }
.sg-r-radius-sm { border-radius: var(--radius-sm); }
.sg-r-radius { border-radius: var(--radius); }
.sg-r-radius-lg { border-radius: var(--radius-lg); }
.sg-r-radius-pill { border-radius: var(--radius-pill); }
.sg-c-unread { background: var(--unread); }
.sg-c-ok { background: var(--ok); }
.sg-c-ok-soft { background: var(--ok-soft); }
.sg-c-warn { background: var(--warn); }
.sg-c-warn-soft { background: var(--warn-soft); }
.sg-c-danger { background: var(--danger); }
.sg-c-danger-soft { background: var(--danger-soft); }
.sg-c-info { background: var(--info); }
.sg-c-info-soft { background: var(--info-soft); }
.sg-c-chrome-bg { background: var(--chrome-bg); }
.sg-c-chrome-text { background: var(--chrome-text); }
.sg-c-code-bg { background: var(--code-bg); }
.sg-c-mark { background: var(--mark); }
.sg-w-4 { width: 4px; }
.sg-w-8 { width: 8px; }
.sg-w-12 { width: 12px; }
.sg-w-16 { width: 16px; }
.sg-w-24 { width: 24px; }
.sg-w-32 { width: 32px; }
.sg-w-48 { width: 48px; }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr) 280px; }
  .site-search { max-width: 300px; }
  .cat-head, .board-row { grid-template-columns: minmax(0, 1fr) 64px 76px 180px; }
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .site-search { display: none; }
  .site-logo-name, .site-register { display: none; }
  .tool-search { display: inline-flex; }
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
  .user-btn-name { display: none; }
}
@media (max-width: 760px) {
  :root { --header-h: 52px; }
  .container { padding: 0 var(--space-4); }
  .site-header-bar { flex-wrap: wrap; height: auto; padding: 0 var(--space-4); gap: 0 8px; }
  .site-logo { height: var(--header-h); align-items: center; }
  .site-logo-name { display: none; }
  .site-tools { margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-3) 8px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 6px 10px; font-size: var(--fs-sm); }
  .site-register { display: none; }
  .site-main { padding-top: var(--space-4); }
  h1 { font-size: var(--fs-xl); }
  .page-intro { align-items: flex-start; }
  .cat-head { grid-template-columns: 1fr; padding: 10px 14px; }
  .cat-cols { display: none; }
  .board-row { grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; }
  .board-main { grid-column: 1 / -1; }
  .board-num { text-align: left; font-size: var(--fs-sm); grid-row: 2; }
  .board-num-posts { display: none; }
  .board-num-label { display: inline; }
  .board-latest { grid-column: 1 / -1; grid-row: 3; margin-top: 4px; }
  .topic-row-head { display: none; }
  .topic-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; align-items: start; }
  .topic-row > .topic-col-num { display: none; }
  .topic-col-last { text-align: right; }
  .topic-last-who { display: none; }
  .topic-mobile-stats { display: inline-flex; }
  .feature { padding: 12px 14px; }
  .feature-group { padding: 8px 14px; }
  .site-footer-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .pager .btn span { display: none; }
  .ad-strip .ad-cell + .ad-cell { display: none; }
  .ad-band { padding: var(--space-2) 0; }
  .notice-box { margin: var(--space-4) 0; }
}
@media (max-width: 900px), (pointer: coarse) {
  .btn-sm { min-height: 36px; }
}
@media print {
  .site-header, .site-footer, .ad-band, .split-aside, .skip { display: none !important; }
  .split { display: block; }
  body { background: #fff; color: #000; }
}
.quote-pop { z-index: 70; box-shadow: var(--shadow-md); }

/* Standard error / notice page (es_error_page) and the ?napomena= page notice */
.error-page { max-width: 720px; margin: var(--space-6, 2rem) auto; }
.error-page .notice-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--space-4, 1rem); }
.page-notice { margin: var(--space-4, 1rem) 0; }
