/* ===========================================================
   The GLP-1 Forum — XenForo-style template stylesheet
   Self-contained, no external dependencies.
   =========================================================== */

:root {
  --accent: #1c7fc7;
  --accent-dark: #0d47a1;
  --accent-darker: #0a3878;
  --header-bg: #0d47a1;
  --header-bg-2: #1565c0;
  --page-bg: #e7eaf0;
  --content-bg: #ffffff;
  --node-alt: #f6f8fa;
  --band-bg: #eef2f7;
  --band-border: #d7dee8;
  --border: #d4dae3;
  --border-light: #e3e8ef;
  --text: #2b3340;
  --text-muted: #6b7480;
  --text-faint: #93a0ad;
  --link: #1c7fc7;
  --link-hover: #0d47a1;
  --shadow: 0 1px 3px rgba(20, 40, 70, 0.10);
  --radius: 6px;
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { color: var(--link-hover); text-decoration: underline; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 14px;
}

/* ===================== Header ===================== */
.site-header {
  background: linear-gradient(180deg, var(--header-bg-2), var(--header-bg));
  color: #fff;
  box-shadow: var(--shadow);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand__logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}
.brand__name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1;
}
.brand__name span { color: #9fd0f5; }
.brand__tag {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #bcd6f2;
  margin-top: 3px;
  letter-spacing: 0.2px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 4px;
  padding: 4px 8px;
  gap: 6px;
}
.search input {
  border: 0;
  outline: 0;
  font-size: 13px;
  width: 150px;
  background: transparent;
  color: var(--text);
}
.search svg { fill: var(--text-faint); }

.btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.22); text-decoration: none; }
.btn--solid {
  background: #ffd54f;
  color: #5a3e00;
  border-color: #f6c321;
}
.btn--solid:hover { background: #ffce3a; text-decoration: none; }

/* ===================== Primary nav ===================== */
.nav {
  background: var(--accent-dark);
  border-bottom: 3px solid var(--accent-darker);
}
.nav__inner {
  display: flex;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 14px;
}
.nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}
.nav__list a {
  display: block;
  color: #dbe7f7;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}
.nav__list a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav__list a.is-active {
  background: var(--page-bg);
  color: var(--accent-dark);
  border-bottom-color: #ffd54f;
}
.nav__toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 22px;
  padding: 10px 14px;
  cursor: pointer;
}

/* ===================== Breadcrumb ===================== */
.breadcrumb {
  background: var(--content-bg);
  border-bottom: 1px solid var(--border);
}
.breadcrumb__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--link); }
.breadcrumb .sep { color: var(--text-faint); margin: 0 7px; }

/* ===================== Layout ===================== */
.layout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 14px 40px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.main { flex: 1 1 auto; min-width: 0; }
.sidebar { flex: 0 0 290px; }

/* ===================== Node list ===================== */
.category {
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.category__header {
  background: linear-gradient(180deg, #2b8ad0, var(--accent));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 14px;
  letter-spacing: 0.2px;
}

.node {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-light);
}
.node:first-of-type { border-top: 0; }
.node:nth-child(even) { background: var(--node-alt); }

.node__icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e1ecf7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.node__icon svg { width: 20px; height: 20px; }
.node--read .node__icon { background: #eef1f5; color: #aab4c0; }

.node__main {
  flex: 1 1 auto;
  min-width: 0;
}
.node__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--link);
  margin: 0 0 2px;
}
.node__title a { color: inherit; }
.node__desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}
.node__sub {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 3px;
}
.node__sub a { color: var(--link); }

.node__stats {
  flex: 0 0 110px;
  text-align: right;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.node__stats b { color: var(--text); font-weight: 600; }

.node__latest {
  flex: 0 0 230px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--text-muted);
  border-left: 1px solid var(--border-light);
  padding-left: 12px;
}
.node__latest .lp-title {
  display: block;
  color: var(--link);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}
.node__latest .lp-meta { color: var(--text-faint); }
.node__latest .lp-meta a { color: var(--link); }

/* avatars */
.avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
}
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 56px; height: 56px; font-size: 20px; }
.av1 { background: #c0392b; } .av2 { background: #2980b9; }
.av3 { background: #27ae60; } .av4 { background: #8e44ad; }
.av5 { background: #d35400; } .av6 { background: #16a085; }
.av7 { background: #2c3e50; } .av8 { background: #e67e22; }
.av9 { background: #7f8c8d; } .av10 { background: #c2185b; }

/* ===================== Sidebar ===================== */
.block {
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.block__title {
  background: var(--band-bg);
  border-bottom: 1px solid var(--band-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  padding: 9px 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.block__body { padding: 11px 13px; }

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border-light);
}
.stat-row:last-child { border-bottom: 0; }
.stat-row .label { color: var(--text-muted); }
.stat-row .value { font-weight: 600; color: var(--text); }

.online-list {
  font-size: 13px;
  line-height: 1.9;
}
.online-list a { color: var(--link); }
.online-count {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
}

.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
  display: flex;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
}
.feed li:last-child { border-bottom: 0; }
.feed__text { min-width: 0; }
.feed__text .t {
  display: block;
  color: var(--link);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed__text .m { font-size: 12px; color: var(--text-faint); }
.feed__text .m a { color: var(--link); }

/* ===================== Thread page ===================== */
.thread-head {
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.thread-head h1 {
  margin: 0 0 6px;
  font-size: 21px;
  color: var(--text);
}
.thread-head .meta {
  font-size: 12.5px;
  color: var(--text-muted);
}
.thread-head .meta a { color: var(--link); }
.tag {
  display: inline-block;
  background: #e1ecf7;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 5px;
}

.post {
  display: flex;
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}
.post__author {
  flex: 0 0 170px;
  background: var(--node-alt);
  border-right: 1px solid var(--border-light);
  padding: 16px 14px;
  text-align: center;
}
.post__author .name {
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 14px;
  margin-top: 8px;
}
.post__author .role {
  display: inline-block;
  font-size: 11px;
  color: #fff;
  background: var(--accent);
  padding: 1px 8px;
  border-radius: 3px;
  margin-top: 5px;
}
.post__author .role--staff { background: #c0392b; }
.post__author .role--vip { background: #8e44ad; }
.post__author .astat {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: left;
  border-top: 1px solid var(--border-light);
  padding-top: 9px;
}
.post__author .astat .row { display: flex; justify-content: space-between; }
.post__author .avatar { margin: 0 auto; }

.post__body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
}
.post__top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.post__top a { color: var(--text-faint); }
.post__content { flex: 1 1 auto; font-size: 14px; }
.post__content p { margin: 0 0 12px; }
.post__content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--node-alt);
  margin: 0 0 12px;
  padding: 9px 13px;
  color: var(--text-muted);
  font-size: 13px;
  border-radius: 0 4px 4px 0;
}
.post__content blockquote .q-author {
  display: block;
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 4px;
}
.post__footer {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
}
.post__footer a {
  color: var(--text-muted);
  font-weight: 600;
}
.post__footer a:hover { color: var(--accent); text-decoration: none; }
.post__footer .react { color: var(--accent); }

/* reply box */
.reply-box {
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.reply-box h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.reply-box .editor {
  border: 1px solid var(--border);
  border-radius: 4px;
  min-height: 110px;
  padding: 10px 12px;
  color: var(--text-faint);
  background: #fcfdfe;
  font-size: 13px;
}
.reply-box .toolbar {
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: var(--band-bg);
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.reply-box .toolbar + .editor { border-radius: 0 0 4px 4px; }
.reply-box .actions { margin-top: 12px; }

/* ===================== Footer ===================== */
.site-footer {
  background: var(--accent-dark);
  color: #cfe0f5;
  margin-top: 10px;
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 14px 26px;
}
.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 12px;
  padding: 0;
}
.footer-nav a { color: #fff; font-weight: 600; font-size: 13px; }
.site-footer .powered { font-size: 12.5px; color: #9fbfe6; }
.site-footer .disclaimer {
  font-size: 12px;
  color: #87a8d3;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 10px;
}

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { flex: 1 1 auto; width: 100%; }
  .node__latest { display: none; }
  .node__stats { flex: 0 0 90px; }

  .nav__toggle { display: block; }
  .nav__list {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .nav__inner.open .nav__list { display: flex; }
  .nav__inner { flex-wrap: wrap; }
  .nav__list a { border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 0; }
  .nav__list a.is-active { border-bottom-color: #ffd54f; }

  .post__author {
    flex: 0 0 120px;
  }
}

@media (max-width: 600px) {
  .search input { width: 90px; }
  .brand__name { font-size: 18px; }
  .node__stats { display: none; }
  .header-tools .btn--ghost { display: none; }
  .post { flex-direction: column; }
  .post__author {
    flex: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
  }
  .post__author .avatar { margin: 0; }
  .post__author .astat { display: none; }
}
