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

  :root {
    --accent: #1a56db;
    --accent-light: #e8f0fe;
    --border: #e0e0e0;
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --bg: #ffffff;
    --bg-alt: #f7f7f7;
    --font: 'IBM Plex Sans', sans-serif;
    --mono: 'IBM Plex Mono', monospace;
  }

  body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
  }

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

  /* NAV */
  .top-bar {
    background: var(--bg);
    border-bottom: 2px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .top-bar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 50px;
  }

  .nav-primary {
    display: flex;
    gap: 0;
    list-style: none;
  }

  .nav-primary li a {
    display: block;
    padding: 14px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
  }

  .nav-primary li a:hover,
  .nav-primary li a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-decoration: none;
  }

  .nav-secondary {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .nav-secondary a {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
  }

  .nav-secondary a:hover { color: var(--accent); text-decoration: none; }

  .btn-login {
    background: var(--accent);
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
  }

  .btn-login:hover { background: #1447c0; text-decoration: none !important; }

  .hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text);
  }

  .mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--bg);
    border-top: 1px solid var(--border);
    max-height: 60vh;
    overflow-y: auto;
    padding: 8px 0;
  }

  .mobile-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--bg-alt);
  }

  .mobile-menu.open { display: flex; }

  /* BREADCRUMB */
  .breadcrumb-bar {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
  }

  .breadcrumb-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-muted);
  }

  .breadcrumb-inner a { color: var(--text-muted); }
  .breadcrumb-inner a:hover { color: var(--accent); text-decoration: none; }
  .breadcrumb-inner span { margin: 0 5px; }

  /* MAIN LAYOUT */
  .page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 28px;
  }

  /* THREAD */
  .thread-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }

  .thread-category {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
  }

  h1.thread-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 12px;
  }

  .thread-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
  }

  .thread-meta span { display: flex; align-items: center; gap: 5px; }

  /* POSTS */
  .post {
    border: 1px solid var(--border);
    margin-bottom: 16px;
    border-radius: 3px;
  }

  .post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
  }

  .post-user {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .avatar {
    width: 32px;
    height: 32px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--mono);
    flex-shrink: 0;
  }

  .post-user-info {}

  .username {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
  }

  .post-role {
    font-size: 11px;
    color: var(--text-muted);
  }

  .post-timestamp {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
  }

  .post-body {
    padding: 16px 14px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
  }

  .post-body p { margin-bottom: 10px; }
  .post-body p:last-child { margin-bottom: 0; }

  .post-footer {
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--text-muted);
  }

  .post-footer button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font);
    padding: 0;
  }

  .post-footer button:hover { color: var(--accent); }

  .post-number {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
  }

  .op-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
    margin-left: 6px;
    font-weight: 600;
    vertical-align: middle;
  }

  /* REPLY BOX */
  .reply-section {
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 16px;
  }

  .reply-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11px;
  }

  .reply-section p {
    font-size: 13px;
    color: var(--text-muted);
  }

  .reply-section a {
    font-weight: 600;
  }

  /* SIDEBAR */
  .sidebar {}

  .sidebar-block {
    border: 1px solid var(--border);
    border-radius: 3px;
    margin-bottom: 20px;
  }

  .sidebar-block-title {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
  }

  .sidebar-block-body {
    padding: 12px;
  }

  .sidebar-stat {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px solid var(--bg-alt);
  }

  .sidebar-stat:last-child { border-bottom: none; }
  .sidebar-stat .label { color: var(--text-muted); }
  .sidebar-stat .value { font-weight: 600; font-family: var(--mono); font-size: 12px; }

  .related-item {
    padding: 7px 0;
    border-bottom: 1px solid var(--bg-alt);
    font-size: 12px;
    line-height: 1.4;
  }

  .related-item:last-child { border-bottom: none; }
  .related-item a { color: var(--text); }
  .related-item a:hover { color: var(--accent); text-decoration: none; }
  .related-item .rmeta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

  /* FOOTER */
  .site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    margin-top: 20px;
  }

  .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 16px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
  }

  .footer-col h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 10px;
  }

  .footer-col p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
  }

  .footer-col ul { list-style: none; }

  .footer-col ul li {
    margin-bottom: 5px;
  }

  .footer-col ul li a {
    font-size: 12px;
    color: var(--text-muted);
  }

  .footer-col ul li a:hover { color: var(--accent); text-decoration: none; }

  .footer-bottom {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 12px 16px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
  }

  /* COLORS for avatars */
  .av1 { background: #dbeafe; color: #1e40af; }
  .av2 { background: #dcfce7; color: #15803d; }
  .av3 { background: #fef9c3; color: #854d0e; }
  .av4 { background: #fce7f3; color: #9d174d; }
  .av5 { background: #ede9fe; color: #6d28d9; }
  .av6 { background: #ffedd5; color: #9a3412; }
  .av7 { background: #e0f2fe; color: #0369a1; }
  .av8 { background: #f0fdf4; color: #166534; }

  /* RESPONSIVE */
  @media (max-width: 768px) {
    .page-wrap { grid-template-columns: 1fr; }
    .sidebar { order: -1; }
    .nav-primary, .nav-secondary { display: none; }
    .hamburger { display: block; }
    .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  }
