
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --charcoal: #2b2b2b;
    --charcoal-light: #444;
    --charcoal-faint: #f5f5f5;
    --green: #1f8c4e;
    --green-light: #e8f5ee;
    --green-mid: #2aab62;
    --border: #ddd;
    --text: #222;
    --muted: #777;
    --white: #fff;
  }

  body {
    font-family: 'IBM Plex Sans', sans-serif;
    background: #fff;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
  }

  /* HEADER */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--charcoal);
    border-bottom: 2px solid var(--green);
    padding: 0 24px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .header-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 4px 10px;
  }

  .header-search input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    width: 160px;
  }

  .header-search input::placeholder { color: rgba(255,255,255,0.45); }

  .header-search svg { color: rgba(255,255,255,0.5); flex-shrink: 0; }

  .header-auth {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .header-auth a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
  }

  .header-auth a:hover { color: #fff; }

  .header-auth .btn-register {
    background: var(--green);
    color: #fff;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
  }

  .header-auth .btn-register:hover { background: var(--green-mid); }

  /* MAIN CONTENT */
  .page-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 36px 20px 60px;
  }

  /* THREAD TITLE BLOCK */
  .thread-title-block {
    text-align: center;
    padding: 32px 0 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
  }

  .thread-category-chip {
    display: inline-block;
    background: var(--green-light);
    color: var(--green);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 14px;
  }

  h1.thread-title {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.3;
    margin-bottom: 14px;
  }

  .thread-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12.5px;
    color: var(--muted);
  }

  .thread-meta span { display: flex; align-items: center; gap: 4px; }

  /* CATEGORY TABS */
  .cat-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
  }

  .cat-tab {
    font-size: 12.5px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--muted);
    background: #fff;
    transition: all 0.15s;
  }

  .cat-tab:hover { border-color: var(--green); color: var(--green); }

  .cat-tab.active {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
  }

  /* POSTS */
  .post-list { display: flex; flex-direction: column; gap: 0; }

  .post {
    display: flex;
    gap: 16px;
    padding: 22px 0;
    border-bottom: 1px solid #eee;
  }

  .post:last-child { border-bottom: none; }

  .post-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    margin-top: 2px;
  }

  .post-body { flex: 1; min-width: 0; }

  .post-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 7px;
  }

  div.username {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--charcoal);
  }

  .post-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .badge-op { background: var(--green-light); color: var(--green); }
  .badge-member { background: #f0f0f0; color: #666; }
  .badge-trusted { background: #e8f0ff; color: #3355cc; }

  .post-time {
    font-size: 12px;
    color: var(--muted);
    margin-left: auto;
  }

  .post-content {
    font-size: 14.5px;
    color: #333;
    line-height: 1.65;
  }

  .post-content p + p { margin-top: 8px; }

  .post-actions {
    display: flex;
    gap: 14px;
    margin-top: 10px;
  }

  .post-action {
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
  }

  .post-action:hover { color: var(--green); }

  .post-number {
    font-size: 11px;
    color: #bbb;
    font-weight: 500;
    margin-top: 2px;
  }

  /* OP HIGHLIGHT */
  .post.is-op { background: var(--charcoal-faint); padding: 22px 18px; border-radius: 6px; border-bottom: none; margin-bottom: 6px; }

  /* REPLY BOX */
  .reply-box {
    margin-top: 32px;
    background: var(--charcoal-faint);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
  }

  .reply-box p {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 12px;
  }

  .reply-box .btn-login {
    display: inline-block;
    background: var(--charcoal);
    color: #fff;
    padding: 9px 22px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin-right: 8px;
  }

  .reply-box .btn-login:hover { background: var(--green); }

  /* FOOTER */
  footer {
    background: var(--charcoal);
    color: rgba(255,255,255,0.6);
    padding: 32px 24px 20px;
    margin-top: 60px;
  }

  .footer-inner {
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    align-items: start;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
  }

  .footer-block h4 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 6px;
  }

  .footer-block p {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255,255,255,0.5);
  }

  .footer-social {
    display: flex;
    gap: 12px;
    margin-top: 4px;
  }

  .footer-social a {
    color: rgba(255,255,255,0.45);
    font-size: 16px;
    text-decoration: none;
    transition: color 0.15s;
  }

  .footer-social a:hover { color: var(--green-mid); }

  .footer-bottom {
    max-width: 820px;
    margin: 0 auto;
    font-size: 11.5px;
    color: rgba(255,255,255,0.3);
    text-align: center;
  }

  @media (max-width: 600px) {
    .footer-inner { grid-template-columns: 1fr; gap: 18px; }
    .post-time { margin-left: 0; width: 100%; }
    .header-search input { width: 100px; }
  }
