/* Aion Owners Club: neutral, high-legibility forum theme */
:root {
  --bg: #f4f3f0;
  --surface: #ffffff;
  --surface-2: #f9f8f6;
  --surface-3: #efede9;
  --border: #e2dfd9;
  --border-strong: #cfcac2;
  --text: #22252a;
  --text-2: #4d535c;
  --muted: #737a84;
  --accent: #3d5a73;
  --accent-hover: #2f4a61;
  --accent-soft: #e6ecf1;
  --ok: #2f6b4f;
  --ok-soft: #e5f1ea;
  --danger: #a33a32;
  --danger-soft: #f7e6e4;
  --warn-soft: #f6f0dd;
  --sticky: #8a6d2f;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(30, 30, 30, 0.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18191b;
    --surface: #212225;
    --surface-2: #1c1d20;
    --surface-3: #2a2b2f;
    --border: #33353a;
    --border-strong: #45484e;
    --text: #e6e4e0;
    --text-2: #c2c0bb;
    --muted: #9a9894;
    --accent: #8fb0cc;
    --accent-hover: #a9c4db;
    --accent-soft: #263240;
    --ok: #7fc39f;
    --ok-soft: #1f3128;
    --danger: #e38b82;
    --danger-soft: #3a2422;
    --warn-soft: #34301f;
    --sticky: #d8b46a;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
img, video { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 0.5em; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.9em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-3); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--surface-3); padding: 0.8rem 1rem; border-radius: var(--radius-sm); overflow-x: auto; }
pre code { background: none; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: 16px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand img { width: 34px; height: 34px; }
.brand small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--muted); letter-spacing: 0; }
.header-search { flex: 1; max-width: 480px; margin-left: auto; display: flex; gap: 6px; }
.header-search input { width: 100%; min-width: 0; }
.header-search .btn { flex-shrink: 0; }
.icon-link.search-mobile { display: none; }
.btn .icon-inline { color: inherit; }
.user-menu { display: flex; align-items: center; gap: 6px; }
.icon-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--text-2); }
.icon-link:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.icon-link svg { width: 20px; height: 20px; }
.badge-count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.badge-count[data-n="0"] { display: none; }

.nav { background: var(--surface); border-bottom: 1px solid var(--border); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { display: block; padding: 10px 14px; color: var(--text-2); font-weight: 550; font-size: 0.93rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.dropdown { position: relative; }
.dropdown summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 24px; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary:hover { background: var(--surface-3); }
.dropdown .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); padding: 6px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-3); text-decoration: none; }
.menu hr { margin: 6px 0; }

main { padding-block: 20px 40px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.layout.single { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .header-search { display: none; }
  .icon-link.search-mobile { display: inline-flex; }
  .user-menu { margin-left: auto; }
}

.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.85rem; padding-block: 24px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: var(--text-2); }

/* ---------- Building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card, .card + .block, .block + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.card-head h2, .card-head h3 { margin: 0; font-size: 0.98rem; }
.card-body { padding: 16px; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.block { margin-bottom: 16px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spread { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 550 0.9rem/1.2 var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-3); text-decoration: none; color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #14191e; } }
.btn-danger { color: var(--danger); border-color: var(--border-strong); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn-ghost { border-color: transparent; background: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-social { width: 100%; padding: 10px 14px; font-size: 0.95rem; }
.btn-social svg { width: 18px; height: 18px; }
.btn.is-on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }

input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 4px; font-weight: 400; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }
.form-narrow { max-width: 440px; margin: 0 auto; }
.inline-form { display: inline; }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid transparent; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--accent-soft); color: var(--accent); }
.alert ul { margin: 0; padding-left: 18px; }
.announcement { background: var(--warn-soft); border-bottom: 1px solid var(--border); padding-block: 9px; font-size: 0.92rem; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 650; background: var(--surface-3); color: var(--text-2); vertical-align: 1px; white-space: nowrap; }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-sticky { background: var(--warn-soft); color: var(--sticky); }
.tag-admin { background: var(--danger-soft); color: var(--danger); }
.tag-moderator { background: var(--ok-soft); color: var(--ok); }

.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; color: #fff; font-weight: 650; flex-shrink: 0; background: var(--surface-3); }

.pager { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pager a, .pager span { min-width: 34px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 0.88rem; }
.pager a:hover { background: var(--surface-3); text-decoration: none; }
.pager .current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 650; }
.pager .gap { border: 0; background: none; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 6px 12px; border-radius: 16px; color: var(--text-2); font-size: 0.88rem; border: 1px solid var(--border); background: var(--surface); }
.tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs a:hover { text-decoration: none; }

table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.data th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--surface-2); }
.table-scroll { overflow-x: auto; }

/* ---------- Board index ---------- */
.forum-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 130px 240px; gap: 14px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.forum-row:last-child { border-bottom: 0; }
.forum-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.forum-icon svg { width: 20px; height: 20px; }
.forum-name { font-weight: 650; font-size: 1rem; color: var(--text); }
.forum-desc { font-size: 0.86rem; color: var(--muted); margin: 2px 0 0; }
.forum-stats { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.forum-stats b { color: var(--text-2); font-weight: 600; }
.forum-last { display: flex; gap: 10px; align-items: center; min-width: 0; font-size: 0.84rem; }
.forum-last .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: var(--text); font-weight: 550; }
.forum-last .meta { color: var(--muted); }
.forum-last > div { min-width: 0; }
@media (max-width: 760px) {
  .forum-row { grid-template-columns: 36px minmax(0, 1fr); }
  .forum-stats { display: none; }
  .forum-last { grid-column: 2; }
}

/* ---------- Thread list ---------- */
.thread-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 110px 170px; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.thread-row:last-child { border-bottom: 0; }
.thread-row.sticky { background: var(--surface-2); }
.thread-title { font-weight: 600; color: var(--text); font-size: 0.97rem; }
.thread-meta { font-size: 0.82rem; color: var(--muted); }
.thread-meta a { color: var(--muted); }
.thread-counts { font-size: 0.82rem; color: var(--muted); text-align: right; line-height: 1.35; }
.thread-last { font-size: 0.82rem; color: var(--muted); text-align: right; line-height: 1.35; }
.thread-last a { color: var(--text-2); }
.icon-inline { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }
@media (max-width: 760px) {
  .thread-row { grid-template-columns: 32px minmax(0, 1fr); }
  .thread-counts, .thread-last { grid-column: 2; text-align: left; }
  .thread-counts { display: none; }
}

/* ---------- Posts ---------- */
.post { display: grid; grid-template-columns: 170px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow); scroll-margin-top: 16px; }
.post:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.post-author { padding: 16px 12px; text-align: center; border-right: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) 0 0 var(--radius); font-size: 0.82rem; color: var(--muted); }
.post-author .name { display: block; font-weight: 700; font-size: 0.95rem; color: var(--text); margin-top: 8px; word-break: break-word; }
.post-author .rank { display: block; margin: 2px 0 8px; }
.post-author .car { display: block; margin: 8px 0; padding: 5px 6px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-weight: 550; }
.post-author dl { margin: 8px 0 0; display: grid; grid-template-columns: auto auto; gap: 1px 8px; justify-content: center; text-align: left; }
.post-author dt { color: var(--muted); }
.post-author dd { margin: 0; color: var(--text-2); }
.post-main { display: flex; flex-direction: column; min-width: 0; }
.post-top { display: flex; justify-content: space-between; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: 0.82rem; color: var(--muted); }
.post-top a { color: var(--muted); }
.post-body { padding: 16px 18px; flex: 1; overflow-wrap: anywhere; }
.post-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--border); }
.post-actions .row { gap: 2px; }
.signature { margin: 0 18px 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 0.84rem; color: var(--muted); }
.signature p { margin: 0; }
.edited { font-size: 0.8rem; color: var(--muted); font-style: italic; padding: 0 18px 10px; }
@media (max-width: 760px) {
  .post { grid-template-columns: minmax(0, 1fr); }
  .post-author { display: flex; align-items: center; gap: 10px; text-align: left; border-right: 0; border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; padding: 10px 14px; }
  .post-author .name { margin: 0; }
  .post-author .rank, .post-author .car { margin: 0; display: inline; padding: 0; border: 0; background: none; }
  .post-author dl { display: none; }
  .post-author .avatar { width: 38px !important; height: 38px !important; }
}

.rich { line-height: 1.65; }
.rich > :last-child { margin-bottom: 0; }
.rich img { border-radius: var(--radius-sm); height: auto; }
.rich blockquote { margin: 0 0 1em; padding: 10px 14px; border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-2); }
.rich blockquote p:last-child { margin: 0; }
.rich ul, .rich ol { padding-left: 1.4em; margin: 0 0 1em; }
.rich table { border-collapse: collapse; margin-bottom: 1em; }
.rich th, .rich td { border: 1px solid var(--border); padding: 6px 10px; }
.embed { position: relative; aspect-ratio: 16 / 9; max-width: 640px; margin: 0 0 1em; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }

.attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.attachments a.img { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); border: 1px solid var(--border); }
.attachments img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.attachments a.img:hover img { transform: scale(1.03); }
.attachments .video { grid-column: 1 / -1; max-width: 720px; }
.attachments video { width: 100%; border-radius: var(--radius-sm); background: #000; max-height: 480px; }

.like-btn .n { font-variant-numeric: tabular-nums; }
.like-btn.liked { color: var(--accent); }
.like-btn svg, .post-actions svg { width: 15px; height: 15px; }

/* ---------- Editor ---------- */
.editor { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.editor:focus-within { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.editor-toolbar button { border: 0; background: none; color: var(--text-2); padding: 5px 8px; border-radius: 4px; cursor: pointer; font: 600 0.85rem var(--font); min-width: 30px; }
.editor-toolbar button:hover { background: var(--surface-3); color: var(--text); }
.editor-toolbar .sep { width: 1px; background: var(--border); margin: 4px 4px; }
.editor-toolbar .grow { flex: 1; }
.editor textarea { border: 0; border-radius: 0; outline: none; min-height: 180px; }
.editor .preview { padding: 12px 14px; min-height: 180px; border-top: 1px dashed var(--border); }
.editor-files { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-size: 0.84rem; color: var(--muted); }
.editor-files input[type="file"] { display: none; }
.file-previews { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.file-previews:empty { display: none; }
.file-chip { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 0.8rem; color: var(--text-2); max-width: 220px; }
.file-chip img, .file-chip .vid { width: 34px; height: 34px; border-radius: 4px; object-fit: cover; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Sidebar ---------- */
.side .card { margin-bottom: 16px; }
.side .card + .card { margin-top: 0; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.86rem; }
.side-list li:last-child { border-bottom: 0; }
.side-list .t { display: block; color: var(--text); font-weight: 550; line-height: 1.35; }
.side-list .meta { color: var(--muted); font-size: 0.8rem; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat b { display: block; font-size: 1.15rem; color: var(--text); font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.online { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 0.86rem; }

/* ---------- Ads: clearly labelled, fixed slots, never overlaying content ---------- */
.ad { text-align: center; margin: 0 auto 16px; overflow: hidden; }
.ad-label { display: block; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-header { max-width: 970px; min-height: 90px; margin-top: 16px; }
.ad-sidebar { min-height: 250px; }
.ad-inline { min-height: 90px; margin-bottom: 14px; padding: 8px 0; }
.ad-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin: 0 auto; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 10px, var(--bg) 10px, var(--bg) 20px); color: var(--muted); font-size: 0.8rem; }
.ad-placeholder-header, .ad-placeholder-inline { width: 100%; max-width: 728px; height: 90px; }
.ad-placeholder-sidebar { width: 100%; max-width: 300px; height: 250px; }
.ad-in-list { padding: 10px 16px 0; border-bottom: 1px solid var(--border); }
.ad-in-list .ad { margin-bottom: 10px; }

/* ---------- News ---------- */
.news-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--shadow); }
.news-card:hover { text-decoration: none; color: var(--text); border-color: var(--border-strong); }
.news-card .cover { aspect-ratio: 16 / 7; background: linear-gradient(135deg, var(--accent-soft), var(--surface-3)); }
.news-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card .body { padding: 12px 14px 14px; }
.news-card h3 { margin: 6px 0 4px; font-size: 1rem; }
.news-card p { margin: 0; font-size: 0.86rem; color: var(--muted); }
.article-item { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 16px; border-bottom: 1px solid var(--border); }
.article-item:last-child { border-bottom: 0; }
.article-item .cover { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden; background: linear-gradient(135deg, var(--accent-soft), var(--surface-3)); }
.article-item .cover img { width: 100%; height: 100%; object-fit: cover; }
.article-item h2 { margin: 4px 0 6px; font-size: 1.15rem; }
.article-item h2 a { color: var(--text); }
@media (max-width: 640px) { .article-item { grid-template-columns: minmax(0, 1fr); } }
.article-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; display: block; }
.article-body { font-size: 1.02rem; padding: 22px 26px; }

/* ---------- Profiles & garage ---------- */
.profile-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 20px; }
.profile-head h1 { margin: 0; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.88rem; color: var(--muted); margin-top: 6px; }
.profile-facts b { color: var(--text); }
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.vehicle { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.vehicle .photo { aspect-ratio: 16 / 10; background: var(--surface-3); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.vehicle .photo img { width: 100%; height: 100%; object-fit: cover; }
.vehicle .photo svg { width: 64px; height: 64px; opacity: 0.4; }
.vehicle .info { padding: 12px 14px; flex: 1; }
.vehicle h3 { margin: 0 0 2px; }
.vehicle .specs { font-size: 0.85rem; color: var(--muted); }
.vehicle .actions { padding: 8px 12px; border-top: 1px solid var(--border); display: flex; gap: 6px; }

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.member { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.member .name { font-weight: 650; color: var(--text); }
.member .meta { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.media-item { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); border: 1px solid var(--border); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item .cap { position: absolute; inset: auto 0 0 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); color: #fff; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item .play { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, 0.6); color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 0.72rem; font-weight: 700; }

/* ---------- Messages ---------- */
.convo-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.convo-row:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.convo-row.unread .subj { font-weight: 750; }
.convo-row.unread { box-shadow: inset 3px 0 0 var(--accent); }
.convo-row .preview { font-size: 0.85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.msg:last-child { border-bottom: 0; }
.msg .content { min-width: 0; flex: 1; }
.msg .head { font-size: 0.84rem; color: var(--muted); margin-bottom: 4px; }
.msg .head b { color: var(--text); }
.msg.mine { background: var(--surface-2); }

.notif { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.notif:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.notif.unread { background: var(--accent-soft); }
.notif .meta { font-size: 0.8rem; color: var(--muted); }

.auth-box { max-width: 420px; margin: 20px auto; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.82rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 10, 10, 0.88); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 4px; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.status-dot.on { background: var(--ok); }
details.mod-tools summary { cursor: pointer; }

.subforums { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 0.84rem; }
.subforums a { color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.subforums a:hover { color: var(--accent); }

.site-credit { background: var(--surface-2); border-top: 1px solid var(--border); color: var(--muted); font-size: 0.8rem; text-align: center; padding-block: 12px; }
.site-credit a { color: var(--text-2); font-weight: 550; }

/* Keep the footer and credit line at the bottom of the window on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

.socials { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.socials a { display: inline-flex; align-items: center; gap: 6px; }
.socials svg { width: 18px; height: 18px; }
.social-card { display: flex; gap: 12px; align-items: center; color: var(--text); margin-bottom: 16px; }
.social-card:hover { text-decoration: none; color: var(--text); border-color: var(--border-strong); }
.social-card .social-icon svg { width: 36px; height: 36px; display: block; }
.social-card b { display: block; }
.footer-right { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
@media (max-width: 760px) { .footer-right { align-items: flex-start; } }
.footer-socials { flex-basis: 100%; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
/* Copyright on its own line, then page links, then social rows */
.site-footer .wrap > div:first-child { flex-basis: 100%; }
@media (min-width: 761px) { .site-footer .wrap > div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }

/* Official GAC accordion in the sidebar */
.official-links summary { list-style: none; cursor: pointer; margin: 0; border: 0; }
.official-links summary::-webkit-details-marker { display: none; }
.official-links summary:hover { background: var(--surface-2); border-radius: var(--radius); }
.official-links .chevron { width: 18px; height: 18px; margin-left: auto; color: var(--muted); flex-shrink: 0; transition: transform 0.2s; }
.official-links[open] .chevron { transform: rotate(180deg); }
.official-links[open] summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.official-links .side-list li { padding: 0; }
.official-link { display: flex; gap: 10px; align-items: center; padding: 10px 14px; width: 100%; color: var(--text); }
.official-link:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.official-link .social-icon svg { width: 26px; height: 26px; display: block; }
.official-contact { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }
.official-contact .btn { flex: 1 1 auto; }
.customer-care .social-card { margin: 0; border-radius: var(--radius) var(--radius) 0 0; }
.customer-care > .official-contact:first-child { border-top: 0; }

/* Collapsible categories */
.cat-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.cat-toggle .chevron { width: 18px; height: 18px; color: var(--muted); transition: transform 0.2s; flex-shrink: 0; }
.category.collapsed .cat-toggle .chevron { transform: rotate(-90deg); }
.category.collapsed .cat-body { display: none; }
.category.collapsed .card-head { border-bottom: 0; border-radius: var(--radius); }
.cat-count { display: none; }
.category.collapsed .cat-count { display: inline; }

/* Favourites */
.fav-form { display: inline; }
.fav-btn { border: 0; background: none; padding: 0 4px; font-size: 1.05rem; line-height: 1; color: var(--muted); cursor: pointer; vertical-align: 1px; }
.fav-btn:hover { color: var(--sticky); text-decoration: none; }
.fav-btn.on, .star-on { color: var(--sticky); }
h1 .fav-btn { font-size: 1.4rem; vertical-align: 2px; }

/* Forums dropdown in the main menu */
.nav-dropdown { position: relative; display: flex; align-items: stretch; }
.nav-dropdown > a { padding-right: 4px; }
.nav-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; height: 100%; padding: 0 8px 0 2px; color: var(--text-2); border-bottom: 2px solid transparent; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover { color: var(--text); background: var(--surface-2); }
.nav-menu summary svg { width: 16px; height: 16px; transition: transform 0.2s; }
.nav-menu[open] summary svg { transform: rotate(180deg); }
.nav-menu .menu { position: absolute; left: 0; top: 100%; z-index: 30; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); padding: 6px; }
.nav-menu .menu a { display: block; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; white-space: nowrap; }
.nav-menu .menu a:hover { background: var(--surface-3); }
.nav-menu .menu hr { margin: 6px 0; }
.category, .favourites { scroll-margin-top: 12px; }
.category > .card-head { cursor: pointer; user-select: none; }
.category > .card-head:hover { background: var(--surface-3); }
.category > .card-head:hover .chevron { color: var(--text); }

/* Floating back-to-top button */
.to-top { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 40; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 0.2s, transform 0.2s, background 0.2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.to-top svg { width: 22px; height: 22px; }
@media (prefers-color-scheme: dark) { .to-top, .to-top:hover { color: #14191e; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* Online / offline indicator */
.presence { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.presence i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.presence.online { color: #2f7d4f; }
.presence.online i { background: #2fa860; box-shadow: 0 0 0 2px rgba(47, 168, 96, 0.2); }
.presence.offline { color: #a23a32; }
.presence.offline i { background: #d0463c; }
@media (prefers-color-scheme: dark) { .presence.online { color: #7fd4a0; } .presence.offline { color: #ec8f87; } }
.post-author .presence { display: flex; justify-content: center; margin-top: 2px; }
@media (max-width: 760px) { .post-author .presence { display: inline-flex; margin: 0 0 0 6px; } }

/* Moderator pin toggle in board thread lists */
.pin-form { display: inline; }
.pin-btn { border: 0; background: none; padding: 2px; vertical-align: -2px; border-radius: 4px; color: var(--border-strong); cursor: pointer; line-height: 0; }
.pin-btn svg { width: 15px; height: 15px; }
.pin-btn:hover { color: var(--text); background: var(--surface-3); }
.pin-btn.on { color: var(--sticky); }

/* Posts from blocked members: blurred behind a notice until revealed */
.post-content { display: flex; flex-direction: column; flex: 1; position: relative; }
.post-content .blockable { flex: 1; display: flex; flex-direction: column; }
.post-content.is-blocked .blockable { filter: blur(6px); opacity: 0.55; user-select: none; pointer-events: none; max-height: 160px; overflow: hidden; }
.blocked-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 18px 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-3); color: var(--text-2); font-size: 0.88rem; font-weight: 600; }
.msg .blocked-notice { margin: 4px 0 8px; }
.blocked-quote { margin-bottom: 1em; }
.blocked-quote .blocked-notice { margin: 0 0 6px; }
.blocked-quote .blockable blockquote { margin-bottom: 0; }

/* Usernames and avatars that link to profiles */
.user-link { color: var(--text-2); font-weight: 600; }
.user-link:hover { color: var(--accent); }
.avatar-link { display: inline-flex; flex-shrink: 0; border-radius: 50%; }
.avatar-link:hover { text-decoration: none; opacity: 0.85; }
.thread-meta .user-link, .forum-last .meta .user-link, .side-list .meta .user-link { color: var(--text-2); }
