:root {
  --ink: #1f2733;
  --muted: #5b6b82;
  --blue: #4b6ea9;
  --blue-dark: #2d4570;
  --blue-light: #e7effb;
  --border: #cad4e3;
  --panel: #f6f8fb;
  --panel-strong: #eef2f7;
  --accent: #f2c14e;
  --shadow: 0 14px 40px rgba(16, 24, 40, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #dfe8f6 0%, #f2f5fb 40%, #ffffff 100%);
}

a {
  color: var(--blue-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  background: linear-gradient(90deg, #314d7c 0%, #4b6ea9 100%);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #1c1c1c;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  font-size: 20px;
}

.brand-meta h1 {
  margin: 0;
  font-size: 22px;
}

.brand-meta p {
  margin: 4px 0 0;
  opacity: 0.85;
  font-size: 14px;
}

.user-nav {
  display: flex;
  gap: 10px;
}

.cmd {
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.cmd-primary {
  background: #ffffff;
  color: var(--blue-dark);
  font-weight: 600;
}

.cmd-inline {
  border-color: var(--border);
  color: var(--blue-dark);
  background: #ffffff;
}

.layout {
  max-width: 1100px;
  margin: 28px auto 40px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
}

.thread-layout {
  grid-template-columns: minmax(0, 1fr) 240px;
}

.panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(22, 28, 45, 0.08);
  overflow: hidden;
}

.panel-title {
  padding: 18px 20px;
  background: var(--panel-strong);
  border-bottom: 1px solid var(--border);
}

.panel-title h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.crumbs {
  font-size: 13px;
  color: var(--muted);
}

.forum-table {
  width: 100%;
  border-collapse: collapse;
}

.forum-table th,
.forum-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.forum-table thead {
  background: var(--panel);
  color: var(--muted);
}

.topic-title a {
  font-weight: 600;
  font-size: 15px;
}

.topic-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.stat {
  text-align: center;
  font-weight: 600;
  color: var(--blue-dark);
}

.last-post time {
  color: var(--muted);
  font-size: 12px;
}

.sidebar .panel {
  margin-bottom: 18px;
}

.panel-compact {
  padding: 18px;
}

.panel-compact h3 {
  margin-top: 0;
  font-size: 16px;
}

.stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stats-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}

.stats-list li:last-child {
  border-bottom: none;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.thread-panel {
  padding-bottom: 12px;
}

.post-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding: 20px;
  background: #ffffff;
}

.post-card:nth-child(even) {
  background: #f9fbff;
}

.post-meta {
  border-right: 1px solid var(--border);
  padding-right: 16px;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--blue);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 10px;
}

.avatar-secondary {
  background: #7389b5;
}

.avatar-tertiary {
  background: #6b7fa8;
}

.avatar-quaternary {
  background: #55698e;
}

.user-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.user-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.post-meta dl {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.post-meta dt {
  margin-top: 8px;
  font-weight: 600;
  color: var(--ink);
}

.post-meta dd {
  margin: 2px 0 0;
}

.post-body header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.post-body h3 {
  margin: 0;
  font-size: 16px;
}

.post-body time {
  font-size: 12px;
  color: var(--muted);
}

.post-body p {
  margin: 12px 0 0;
  line-height: 1.5;
}

blockquote {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  font-size: 13px;
  color: var(--ink);
}

.post-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 30px;
  max-width: 1100px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .layout,
  .thread-layout {
    grid-template-columns: 1fr;
  }

  .user-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-meta {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 12px;
  }
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .site-footer {
    flex-direction: column;
    gap: 6px;
  }
}
