/* chinaebikes.uk - single stylesheet.
   Recreates the late-2019 MyBB "NewBB" (myhub) theme look:
   GitHub-style dark header (#24292e), light grey thead bars (#f6f8fa),
   1px #e1e4e8 borders, 13px system font, coloured "label" pills. */

:root {
  --ink: #24292e;
  --text: #333;
  --muted: #666;
  --faint: #888;
  --line: #e1e4e8;
  --bar: #f6f8fa;
  --foot: #fafbfc;
  --link-hover: #0366d6;
  --purple: #5319e7;
  --teal: #006b75;
  --red: #fc2929;
  --green: #00b200;
  --ok: #28a745;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: #fff;
  color: var(--text);
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.4;
}

a:link, a:visited { color: var(--ink); text-decoration: none; }
a:hover, a:active { color: var(--link-hover); text-decoration: none; }

.wrapper {
  width: 85%;
  max-width: 1500px;
  margin: 0 auto;
}

.float_left { float: left; }
.float_right { float: right; }
.clear { clear: both; }
.smalltext { font-size: 12px; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */
#header {
  padding: 10px;
  color: rgba(255,255,255,0.75);
  background-color: var(--ink);
}
#logo .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
a.textlogo, a.textlogo:visited {
  color: #fff;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
a.textlogo:hover { color: #fff; }
.textlogo svg { width: 18px; height: 18px; fill: none; stroke: #ccc; stroke-width: 1.6; }
.textlogo .tld { color: #9aa4ae; font-size: 12px; }

ul.top_links {
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: bold;
  text-align: right;
}
ul.top_links li { display: inline; margin: 0 7px; }
ul.top_links li a, ul.top_links li a:visited { color: #fff; line-height: 16px; }
ul.top_links li a:hover { color: #c8e1ff; }
ul.top_links li a[aria-current="page"] { border-bottom: 2px solid #fff; }

#panel .upper {
  color: #fff;
  padding: 7px 0 0;
  clear: both;
}
#panel .upper .wrapper { overflow: hidden; }
#panel .upper a, #panel .upper a:visited { color: #fff; font-weight: bold; }
#panel .upper a.register, #panel .upper a.register:visited { color: var(--green); }

/* ---------- Content ---------- */
#content {
  background: #fff;
  padding: 20px 0;
  overflow: hidden;
}

.navigation {
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.navigation .globe { width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px; fill: none; stroke: var(--text); stroke-width: 1.4; }
.navigation .sep { color: var(--faint); margin: 0 4px; }
.navigation .active {
  color: var(--text);
  font-size: 16px;
  font-weight: bold;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 78fr) minmax(0, 22fr);
  gap: 10px;
  align-items: start;
}
.layout.single { grid-template-columns: minmax(0, 1fr); }

/* ---------- MyBB tables ---------- */
.tborder, .tborder2 {
  background: #fff;
  width: 100%;
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  padding: 1px;
  margin: 0 0 18px;
}
.tborder2 { padding: 0; border-bottom: none; }

.thead {
  color: var(--ink);
  background-color: var(--bar);
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: normal;
}
.thead strong, .thead h1, .thead h2 { font-size: 13px; margin: 0; font-weight: bold; }
.thead a, .thead a:visited { color: var(--ink); }
.thead .smalltext { color: var(--muted); font-weight: normal; margin-top: 2px; }
.theadm {
  color: var(--ink);
  background-color: var(--bar);
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.theadm h2 { font-size: 13px; margin: 0; }

.tcat {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: bold;
  text-align: left;
}
.trow1, .trow2 {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
}
.tfoot {
  background: #fff;
  color: var(--muted);
  padding: 6px;
  text-align: right;
}
.tfoot a, .tfoot a:visited { color: #444; }
.tfoot a:hover { text-decoration: underline; }

/* status icon cell */
.forum_status {
  width: 30px;
  height: 25px;
  display: inline-block;
  color: var(--ink);
}
.forum_status svg { width: 22px; height: 22px; margin: 2px 4px; }
.forum_off { color: var(--ok); opacity: .55; }

.board-name { font-size: 13px; font-weight: bold; margin: 0; display: inline; }
.board-desc { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.board-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.board-head { display: flex; justify-content: space-between; gap: 10px; }
.lastpost { margin-top: 10px; font-size: 12px; line-height: 2; }

/* coloured label pills (from the old lastpost template) */
.label {
  display: inline-block;
  border-radius: 3px;
  color: #fff !important;
  padding: 2px 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: inset 0 -1px 0 rgba(27,31,35,0.12);
  margin-right: 6px;
  vertical-align: middle;
}
a .label:hover { filter: brightness(1.15); }
.label.purple { background-color: var(--purple); }
.label.teal { background-color: var(--teal); }
.label.red { background-color: var(--red); }
.label.green { background-color: var(--ok); }
.label.grey { background-color: #6a737d; }

/* article list rows */
.article-row .title { font-weight: bold; font-size: 13px; }
.article-row p { margin: 4px 0 6px; color: #555; }
.col-meta { width: 150px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.thumb {
  width: 64px; height: 48px; border-radius: 3px; display: block;
  background: linear-gradient(135deg, #24292e, #586069);
  object-fit: cover;
}

/* sidebar */
.trowl { background: #fff; padding: 0; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 8px; border-bottom: 1px solid var(--line); font-size: 12px; }
.side-list li a { font-weight: bold; display: block; margin-bottom: 4px; }
.stats-row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 12px; }

/* buttons */
a.button, a.button:visited, .button {
  display: inline-block;
  color: #fff;
  background-color: var(--ok);
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 100%);
  border: 1px solid rgba(27,31,35,0.2);
  border-radius: 3px;
  padding: 6px 12px;
  font-weight: bold;
  font-size: 12px;
}
a.button:hover { color: #fff; filter: brightness(1.08); }
a.button.dark, a.button.dark:visited { background-color: var(--ink); }

/* ---------- Article (showthread-style post) ---------- */
.post { border: 1px solid var(--line); margin-bottom: 18px; }
.post_author {
  border-bottom: 1px solid var(--line);
  background: var(--bar);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.author_avatar {
  width: 44px; height: 44px; border: 1px solid #ddd; background: #fff; padding: 4px;
  border-radius: 3px; flex: none;
}
.author_avatar svg { width: 100%; height: 100%; }
.author_information { flex: 1 1 auto; }
.author_information .name { font-weight: bold; font-size: 14px; }
.author_statistics { color: var(--muted); font-size: 12px; text-align: right; }
.post_head { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); overflow: hidden; }
.post_body {
  padding: 14px 18px 20px;
  font-size: 15px;
  line-height: 1.65;
  color: #24292e;
  max-width: 820px;
}
.post_body h1 { font-size: 22px; margin: 4px 0 12px; line-height: 1.3; }
.post_body h2 { font-size: 17px; margin: 26px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.post_body h3 { font-size: 15px; margin: 20px 0 6px; }
.post_body a, .post_body a:visited { color: var(--link-hover); }
.post_body a:hover { text-decoration: underline; }
.post_body ul, .post_body ol { padding-left: 22px; }
.post_body li { margin-bottom: 4px; }
.post_body .lead { font-size: 16px; color: #444; }
.post_body figure { margin: 16px 0; }
.post_body figure img { width: 100%; height: auto; border-radius: 3px; display: block; background: var(--bar); }
.post_body figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.post_body blockquote, .codeblock {
  margin: 14px 0;
  padding: 10px 12px;
  background: var(--foot);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  font-size: 14px;
}
.post_body table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 12px 0; }
.post_body th, .post_body td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.post_body th { background: var(--bar); }
.post_foot { padding: 8px 10px; border-top: 1px solid var(--line); background: var(--foot); font-size: 12px; color: var(--muted); }

/* generic page body inside a tborder */
.page-body { padding: 12px 14px 16px; font-size: 14px; line-height: 1.6; max-width: 860px; }
.page-body h2 { font-size: 15px; margin: 20px 0 6px; }
.page-body a, .page-body a:visited { color: var(--link-hover); }
.page-body ul { padding-left: 20px; }
.notice {
  background: #fffbdd; border: 1px solid #d9d0a5; color: #735c0f;
  padding: 8px 10px; border-radius: 3px; font-size: 12px; margin-bottom: 18px;
}

/* placeholder marker for the template */
.ph { background: #fff5b1; outline: 1px dashed #d4a72c; padding: 0 3px; }

/* ---------- Footer ---------- */
#footer { clear: both; }
#footer .upper {
  border-top: 1px solid var(--line);
  padding: 8px 6px;
  overflow: hidden;
  background-color: var(--foot);
  font-size: 12px;
}
#footer ul.bottom_links { margin: 0; padding: 0; list-style: none; float: left; }
#footer ul.bottom_links li { display: inline; margin: 0 5px; }
#footer a, #footer a:visited { color: #777; }
#footer a:hover { color: #333; }
#footer .upper .float_right { color: #777; }
#footer .lower {
  color: var(--muted);
  padding: 6px 6px 14px;
  overflow: hidden;
  background-color: var(--foot);
  font-size: 11px;
}
#footer .lower a, #footer .lower a:visited { color: #444; font-weight: bold; }
#footer .lower #current_time { float: right; color: var(--faint); }
#footer .disclaimer { display: block; margin-top: 4px; color: var(--faint); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .wrapper { width: auto; margin: 0 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .textlogo .tld { display: none; }
  ul.top_links { text-align: left; width: 100%; }
  ul.top_links li { margin: 0 12px 0 0; display: inline-block; padding: 4px 0; }
  .col-meta, .col-thumb { display: none; }
  .board-head { flex-direction: column; gap: 2px; }
  .post_body { padding: 12px 12px 18px; font-size: 15px; }
  .author_statistics { text-align: left; width: 100%; }
  #footer ul.bottom_links, #footer .upper .float_right,
  #footer .lower #current_time { float: none; display: block; margin-bottom: 4px; }
}
