/* Shared type scale for the public cb theme, including legacy DLE output. */
:root {
  --font-text: Arial, Helvetica, sans-serif;
  --text-body: .9375rem;
  --text-ui: .8125rem;
  --text-small: .8125rem;
  --text-caption: .75rem;
  --heading-page: clamp(1.625rem, 2.6vw, 2rem);
  --heading-section: clamp(1.25rem, 1.8vw, 1.5rem);
  --heading-card: clamp(1.125rem, 1.6vw, 1.375rem);
  --ink: #242424;
  --muted: #666;
}
html { font-size: 16px; }
body { font-family: var(--font-text); font-size: var(--text-body); line-height: 1.7; }
button, input, textarea, select, optgroup { font-family: var(--font-text); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-text); font-weight: 700; line-height: 1.3; letter-spacing: -.025em; text-wrap: pretty; }
h1 { font-size: var(--heading-page); }
h2 { font-size: var(--heading-section); }
h3 { font-size: 1.125rem; }
h4, h5, h6 { font-size: 1rem; }
p { margin: 0 0 1em; }
strong, b { font-weight: 700; }
a { text-underline-offset: .2em; text-decoration-thickness: 1px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }

/* Navigation, controls and supporting copy share three readable sizes. */
.header-nav, .account-link, .category-nav > a, .category-nav summary,
.category-nav details a, .site-search input, .site-search button,
.hero .button, .text-link, .panel-link, .profile-menu,
.login-form input, .login-form button, .navigation,
button, input[type=button], input[type=submit], select, textarea {
  font-size: var(--text-ui); line-height: 1.5;
}
.header-nav, .account-link, .category-nav > a, .category-nav summary,
.button, button, .panel-link, .related-read { font-weight: 700; }
.eyebrow, .related-heading .eyebrow, .search-row > .eyebrow {
  font-size: .6875rem; font-weight: 700; line-height: 1.5; letter-spacing: .13em;
}
.brand small { font-size: .6875rem; line-height: 1.4; letter-spacing: 0; }
.hero h1 { font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.15; letter-spacing: -.04em; }
.hero p { font-size: var(--text-body); line-height: 1.7; }
.full-story > h1, .static-page > h1 { font-size: var(--heading-page); line-height: 1.25; margin-bottom: 24px; }
.story-card > h2 { font-size: var(--heading-card); line-height: 1.35; }
.section-heading h2, .related-heading h2 { font-size: var(--heading-section); }
.sidebar .panel h2, .panel > h2, .notice h2 { font-size: 1.125rem; line-height: 1.4; letter-spacing: -.015em; }
.story-meta, .story-footer, .section-heading > span, .related-category,
.related-read, .resident small, .login-links,
.social-links, .site-footer, .comment-meta, .comment-actions {
  font-size: var(--text-caption); line-height: 1.6;
}
.resident, .muted, .login-form label, .community-vote,
.community-vote .vote, .vote-actions button {
  font-size: var(--text-small); line-height: 1.6;
}
.resident small { color: var(--muted); }
.related-card h3 { font-size: 1rem; line-height: 1.5; letter-spacing: -.01em; }
.login-form label { font-weight: 700; }
.login-links { flex-wrap: wrap; }
.vote-actions { flex-wrap: wrap; }

/* Articles imported from the old site contain font tags and inline typography.
   Override only their presentation; retain emphasis, links, headings and content. */
.story-body, .comment-body, .static-content, .notice-body {
  font-family: var(--font-text); font-size: var(--text-body); line-height: 1.75;
  color: var(--ink); text-align: left; overflow-wrap: anywhere;
}
:is(.story-body, .comment-body, .static-content, .notice-body) :is(p, div, span, font, td, th, li, a, strong, b, em, i) {
  font-family: inherit !important; font-size: inherit !important; line-height: inherit !important;
}
:is(.story-body, .comment-body, .static-content) :is(font, [style*="color"]) { color: inherit !important; }
:is(.story-body, .comment-body, .static-content) :is(p, div)[align],
:is(.story-body, .comment-body, .static-content) :is(p, div)[style*="text-align"] { text-align: left !important; }
:is(.story-body, .comment-body, .static-content) p { margin: 0 0 1em; }
:is(.story-body, .comment-body, .static-content) :is(h2, h3, h4) { margin: 1.5em 0 .65em; color: var(--ink); }
:is(.story-body, .comment-body, .static-content) a { color: #b81020 !important; text-decoration: underline; }
:is(.story-body, .comment-body, .static-content) a:hover { color: #8c0c18 !important; }
:is(.story-body, .comment-body, .static-content) :is(ul, ol) { padding-left: 1.5em; margin: 1em 0; }
:is(.story-body, .comment-body, .static-content) li + li { margin-top: .4em; }
blockquote, .quote { margin: 1.25em 0; padding: 16px 20px; border-left: 3px solid var(--green); border-radius: 0 8px 8px 0; background: #fff3f4; color: var(--ink); font: inherit; }
code, pre, .scriptcode { font-family: Consolas, monospace; font-size: .875rem; line-height: 1.6; }

/* Compatibility for forms, profiles, galleries and other table-based templates. */
.page-shell :is(.alls, .info, .slink, .f_input, .f_textarea, .search, .searchitem, .pm, .fbutton, .bbcodes, .bbcodes_poll) {
  font-family: var(--font-text); font-size: var(--text-ui); line-height: 1.65;
}
.page-shell :is(.alls, .info, .slink, .search, .searchitem) { color: var(--ink); }
.page-shell .category { font-family: var(--font-text); font-size: var(--text-caption); line-height: 1.6; color: var(--muted); }
.page-shell td.title { padding: 14px 18px !important; background: #fff0f1; color: var(--ink); font-family: var(--font-text); font-size: 1.125rem; font-weight: 700; line-height: 1.4; border: 0 !important; }
.page-shell td.title a { color: inherit; }
.page-shell :is(.alls, .info) font { font-family: inherit !important; font-size: inherit !important; }
.page-shell :is(.f_input, .f_textarea, .bbcodes, .bbcodes_poll) { line-height: 1.5; }
.page-shell .bbcodes, .page-shell .bbcodes_poll { background: var(--green); color: #fff; border: 0; border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.ui-dialog, .ui-dialog input, .ui-dialog button, #newpm { font-family: var(--font-text); font-size: var(--text-ui); line-height: 1.6; }
.notice { border-left: 3px solid var(--green); }
.notice h2 { margin-bottom: 12px; }
.comment-card { padding: 24px; }
.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); margin-bottom: 18px; }
.comment-author { color: var(--ink); font-weight: 700; font-size: var(--text-ui); }
.comment-layout { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 16px; }
.comment-avatar { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.comment-signature { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--text-small); }
.comment-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; color: #b81020; }
@media(max-width:760px) {
  .hero h1 { font-size: 2rem; }
  .header-inner { gap: 14px; }
  .account-link { font-size: var(--text-caption); }
  .header-nav, .category-nav > a, .category-nav summary { font-size: var(--text-small); }
  .story-body, .comment-body, .static-content { line-height: 1.7; }
  .comment-card { padding: 20px; }
  .comment-layout { grid-template-columns: 36px minmax(0,1fr); gap: 12px; }
  .comment-avatar { width: 36px; height: 36px; }
}

.legacy-form { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.legacy-form input[type=button] { font-family: var(--font-text); font-size: var(--text-ui); cursor: pointer; }
@media(max-width:600px) {
  .legacy-form, .legacy-form :is(table, tbody, tr, td) { display: block; width: 100% !important; max-width: 100%; height: auto; box-sizing: border-box; }
  .legacy-form td { padding: 6px 10px !important; }
  .legacy-form td.title { padding: 16px !important; }
  .legacy-form :is(input, textarea, select) { max-width: 100% !important; }
  .legacy-form nobr { white-space: normal; }
}

/* Legacy articles can wrap the entire text in an inline bold span. */
.story-body { font-weight: 400; }
.story-body :is(span, div, p, font, td, li)[style*="font-weight" i] {
  font-weight: inherit !important;
}
.story-body :is(h1, h2, h3, h4, h5, h6, strong, b) { font-weight: 700; }

.news-card-copy h2{font-size:1.125rem}.news-card:nth-of-type(-n+5) .news-card-copy h2{font-size:1.375rem}
