:root {
  color-scheme: dark;
  --ink: #07090c;
  --surface: #0d1015;
  --surface-2: #12161d;
  --surface-3: #171c24;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f1eb;
  --muted: #9198a4;
  --gold: #d8ad46;
  --gold-soft: #f0cc72;
  --gold-dim: rgba(216, 173, 70, 0.12);
  --red: #e86f63;
  --green: #56c88f;
  --blue: #68a8ff;
  --violet: #9e82ee;
  --radius: 14px;
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--ink);
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--ink); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-shell { min-height: 100vh; background: radial-gradient(circle at 78% 7%, rgba(216,173,70,.055), transparent 28%), var(--ink); }
.topbar { height: 76px; padding: 0 30px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 30px; position: sticky; top: 0; z-index: 20; background: rgba(7,9,12,.94); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; cursor: pointer; min-width: 252px; text-align: left; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold-soft); font: 700 13px/1 "Space Grotesk"; transform: rotate(45deg); }
.brand-mark::first-line { transform: rotate(-45deg); }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font: 700 15px/1.2 "Space Grotesk"; letter-spacing: .09em; }
.brand-copy span { font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.topnav { display: flex; align-self: stretch; }
.nav-link { border: 0; border-bottom: 2px solid transparent; padding: 0 15px; background: none; color: var(--muted); cursor: pointer; font-weight: 600; }
.nav-link:hover, .nav-link.is-active { color: var(--text); border-color: var(--gold); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button, .ghost-button, .gold-button, .outline-button, .text-button { border-radius: 8px; cursor: pointer; transition: .18s ease; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line); color: var(--muted); }
.icon-button svg, .search-box svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-button:hover { color: var(--text); border-color: var(--line-strong); }
.ghost-button { padding: 10px 15px; border: 0; background: transparent; color: var(--muted); font-weight: 600; }
.ghost-button:hover { color: var(--text); }
.gold-button { padding: 11px 17px; border: 1px solid var(--gold); background: var(--gold); color: #0c0d0f; font-weight: 800; }
.gold-button:hover { background: var(--gold-soft); border-color: var(--gold-soft); transform: translateY(-1px); }
.connection-bar { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 7px 20px; border-bottom: 1px solid rgba(216,173,70,.16); background: rgba(216,173,70,.045); color: #aaa598; font-size: 12px; letter-spacing: .03em; }
.connection-bar strong { color: #d5b967; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(86,200,143,.08); }
.bar-divider { height: 11px; width: 1px; background: var(--line-strong); }

.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 280px; max-width: 1510px; margin: 0 auto; min-height: calc(100vh - 110px); }
.sidebar { padding: 28px 20px; border-right: 1px solid var(--line); }
.side-section { margin-bottom: 30px; }
.eyebrow { margin: 0 0 11px; color: #747c88; font: 700 11px/1.2 "Space Grotesk"; letter-spacing: .16em; }
.eyebrow.gold { color: var(--gold); }
.side-link { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 40px; border: 0; border-radius: 8px; padding: 9px 10px; color: #9ba2ad; background: transparent; cursor: pointer; text-align: left; font-size: 14px; }
.side-link:hover { background: rgba(255,255,255,.035); color: var(--text); }
.side-link.is-active { background: var(--gold-dim); color: var(--gold-soft); }
.side-icon { width: 18px; text-align: center; color: #717985; }
.category-count { margin-left: auto; font-size: 11px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 10px; color: #69717c; }
.builder-card { margin-top: 34px; padding: 17px; border: 1px solid rgba(216,173,70,.2); border-radius: var(--radius); background: linear-gradient(145deg, rgba(216,173,70,.09), rgba(255,255,255,.018)); }
.builder-card strong { display: block; font: 600 17px/1.3 "Space Grotesk"; }
.builder-card p:not(.eyebrow) { margin: 7px 0 15px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.builder-card button, .founder-desk button { padding: 0; border: 0; background: transparent; color: var(--gold-soft); font-weight: 700; font-size: 13px; cursor: pointer; }
.builder-card button span, .founder-desk button span { margin-left: 5px; }

.content { min-width: 0; padding: 34px clamp(22px, 3vw, 46px) 60px; }
.forum-intro { display: flex; justify-content: space-between; gap: 35px; align-items: end; padding: 10px 0 32px; border-bottom: 1px solid var(--line); }
.forum-intro h1 { margin: 0; max-width: 700px; font: 700 clamp(31px, 4vw, 54px)/1.04 "Space Grotesk"; letter-spacing: -.045em; }
.forum-intro h1 span { color: var(--gold-soft); }
.intro-copy { max-width: 670px; margin: 17px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.intro-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; min-width: 280px; }
.intro-stats div { display: grid; gap: 3px; padding-left: 15px; border-left: 1px solid var(--line-strong); }
.intro-stats strong { font: 600 22px/1 "Space Grotesk"; }
.intro-stats span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.control-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 22px 0 26px; }
.tabs { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); }
.tab { border: 0; padding: 8px 13px; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; }
.tab:hover, .tab.is-active { color: var(--text); background: var(--surface-3); }
.search-box { width: min(340px, 43%); height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: #656e79; }
.search-box:focus-within { border-color: rgba(216,173,70,.55); color: var(--gold); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 14px; }
.search-box input::placeholder { color: #69717c; }
.mobile-section-filter { display: none; }
.feed-header { display: flex; justify-content: space-between; align-items: end; margin: 0 0 13px; }
.feed-header h2 { margin: 0; font: 600 22px/1.2 "Space Grotesk"; letter-spacing: -.02em; }
.text-button { border: 0; background: transparent; color: var(--gold-soft); padding: 8px 0; font-weight: 700; }
.text-button:hover { color: #ffe7a5; }

.thread-list { display: grid; border-top: 1px solid var(--line); }
.thread-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; padding: 20px 4px; border-bottom: 1px solid var(--line); cursor: pointer; transition: .16s ease; }
.thread-card:hover { background: linear-gradient(90deg, rgba(216,173,70,.055), transparent 72%); padding-left: 10px; padding-right: 10px; }
.avatar { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: #202631; color: #d9dde4; font: 700 12px/1 "Space Grotesk"; border: 1px solid var(--line-strong); }
.avatar.owner { background: var(--gold); border-color: var(--gold-soft); color: #0c0d0f; }
.thread-main { min-width: 0; }
.thread-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 7px; }
.pill { padding: 3px 7px; border-radius: 4px; font: 700 10px/1.2 "Space Grotesk"; letter-spacing: .06em; color: #b7bdc6; background: #1d232c; border: 1px solid rgba(255,255,255,.06); }
.pill.gold { color: var(--gold-soft); border-color: rgba(216,173,70,.35); background: var(--gold-dim); }
.pill.red { color: #ff9f94; background: rgba(232,111,99,.1); border-color: rgba(232,111,99,.25); }
.pill.blue { color: #96c0ff; background: rgba(104,168,255,.1); border-color: rgba(104,168,255,.25); }
.thread-card h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 16px/1.35 "Space Grotesk"; letter-spacing: -.01em; }
.thread-card:hover h3 { color: var(--gold-soft); }
.thread-excerpt { margin: 6px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7f8792; font-size: 13px; }
.thread-meta { margin-top: 8px; color: #69717c; font-size: 12px; }
.thread-meta strong { color: #a7adb6; font-weight: 600; }
.thread-stats { align-self: center; display: grid; grid-template-columns: repeat(2, 54px); gap: 5px; text-align: right; }
.thread-stats span { display: grid; gap: 2px; color: #646d79; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.thread-stats strong { color: #c4c8ce; font: 600 15px/1.1 "Space Grotesk"; }
.empty-state { padding: 58px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--text); margin-bottom: 6px; font: 600 18px "Space Grotesk"; }

.right-rail { padding: 30px 20px; border-left: 1px solid var(--line); }
.rail-card { margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, rgba(255,255,255,.035), rgba(255,255,255,.014)); }
.rail-card.compact { padding-bottom: 16px; }
.founder-desk { border-color: rgba(216,173,70,.23); background: linear-gradient(150deg, rgba(216,173,70,.1), rgba(255,255,255,.015)); }
.desk-profile { display: flex; align-items: center; gap: 11px; }
.desk-profile div { display: grid; gap: 3px; }
.desk-profile strong { font-size: 14px; }
.desk-profile span { color: var(--green); font-size: 11px; }
.founder-desk blockquote { margin: 16px 0; padding-left: 13px; border-left: 2px solid var(--gold); color: #b3b6ba; font: 500 14px/1.55 "Space Grotesk"; }
.rail-heading { display: flex; justify-content: space-between; align-items: center; }
.live-label { padding: 3px 6px; border-radius: 4px; color: var(--green); background: rgba(86,200,143,.1); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.build-room-list { display: grid; }
.build-room-list button { display: flex; align-items: center; gap: 10px; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.build-room-list button:last-child { border-bottom: 0; }
.build-room-list button:hover strong { color: var(--gold-soft); }
.room-mark { width: 33px; height: 33px; border-radius: 8px; display: grid; place-items: center; font: 700 12px "Space Grotesk"; }
.room-mark.violet { background: rgba(158,130,238,.14); color: #bda8fa; }
.room-mark.amber { background: rgba(216,173,70,.14); color: var(--gold-soft); }
.room-mark.blue { background: rgba(104,168,255,.14); color: #9bc4ff; }
.build-room-list button > span:last-child { display: grid; gap: 3px; }
.build-room-list strong { font-size: 13px; }
.build-room-list small { color: #6f7782; font-size: 11px; }
.weekly-question { display: flex; gap: 10px; align-items: start; }
.weekly-question > span { color: var(--gold); font: 600 22px "Space Grotesk"; }
.weekly-question p { margin: 0; font: 600 14px/1.5 "Space Grotesk"; }
.outline-button { width: 100%; margin-top: 15px; padding: 9px 12px; background: transparent; color: #b4bac3; border: 1px solid var(--line-strong); font-weight: 700; font-size: 12px; }
.outline-button:hover { border-color: var(--gold); color: var(--gold-soft); }

.thread-view { max-width: 870px; margin: 0 auto; }
.back-button { padding: 0; margin-bottom: 24px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.back-button:hover { color: var(--gold-soft); }
.thread-hero { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(216,173,70,.07), rgba(255,255,255,.018)); }
.thread-hero h1 { margin: 12px 0; font: 700 clamp(27px,4vw,42px)/1.1 "Space Grotesk"; letter-spacing: -.035em; }
.thread-author { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.thread-author strong { color: var(--text); }
.post { display: grid; grid-template-columns: 150px minmax(0,1fr); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 15px; overflow: hidden; }
.post-profile { padding: 20px; background: rgba(255,255,255,.025); border-right: 1px solid var(--line); }
.post-profile strong { display: block; margin-top: 9px; font: 600 14px "Space Grotesk"; }
.post-profile span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.post-body { padding: 23px; color: #c8cbd0; line-height: 1.72; font-size: 15px; }
.post-body p:first-child { margin-top: 0; }
.post-body p:last-child { margin-bottom: 0; }
.post-actions { display: flex; gap: 10px; margin-top: 18px; }
.reaction-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.reaction-button.is-liked { color: var(--gold-soft); border-color: rgba(216,173,70,.35); background: var(--gold-dim); }
.reply-box { margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.reply-box h3 { margin: 0 0 12px; font: 600 18px "Space Grotesk"; }
.reply-box textarea { width: 100%; resize: vertical; min-height: 110px; padding: 13px; color: var(--text); background: #090c10; border: 1px solid var(--line-strong); border-radius: 8px; line-height: 1.5; }
.reply-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 11px; }
.reply-actions span { color: var(--muted); font-size: 12px; }

footer { min-height: 70px; display: flex; align-items: center; gap: 25px; padding: 20px 30px; border-top: 1px solid var(--line); color: #606873; font-size: 12px; }
footer > span:nth-child(2) { color: #8b919a; }
footer nav { margin-left: auto; display: flex; gap: 18px; }
footer button { padding: 0; border: 0; background: transparent; color: #777f89; cursor: pointer; }
footer button:hover { color: var(--text); }

dialog { width: min(610px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; color: var(--text); background: #10141a; box-shadow: 0 24px 80px rgba(0,0,0,.65); }
dialog::backdrop { background: rgba(2,3,5,.78); backdrop-filter: blur(5px); }
dialog form { padding: 25px; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 22px; }
.dialog-head h2, .message-dialog h2 { margin: 0; font: 600 25px "Space Grotesk"; }
.dialog-head .icon-button { border: 0; font-size: 24px; }
dialog label { display: grid; gap: 7px; margin: 14px 0; color: #b7bcc4; font-size: 13px; font-weight: 700; }
dialog input, dialog select, dialog textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: #090c10; color: var(--text); font-size: 15px; }
dialog textarea { resize: vertical; line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.message-dialog { width: min(440px, calc(100vw - 32px)); }
.message-dialog p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.message-dialog .gold-button { width: 100%; margin-top: 10px; }

@media (max-width: 1180px) {
  .layout { grid-template-columns: 220px minmax(0,1fr); }
  .right-rail { display: none; }
  .topnav { display: none; }
}
@media (max-width: 780px) {
  .topbar { height: 68px; padding: 0 16px; }
  .brand { min-width: 0; }
  .brand-copy span { display: none; }
  .top-actions .ghost-button, .top-actions .icon-button { display: none; }
  .gold-button { padding: 10px 12px; font-size: 13px; }
  .connection-bar { justify-content: flex-start; overflow: hidden; white-space: nowrap; }
  .connection-bar .bar-divider, .connection-bar > span:nth-of-type(1) { display: none; }
  .layout { display: block; }
  .sidebar { display: none; }
  .content { padding: 25px 16px 45px; }
  .forum-intro { display: block; padding-top: 3px; }
  .forum-intro h1 { font-size: clamp(34px, 10vw, 47px); }
  .intro-stats { margin-top: 24px; min-width: 0; gap: 9px; }
  .intro-stats div { padding-left: 10px; }
  .intro-stats strong { font-size: 18px; }
  .control-panel { display: grid; }
  .tabs { overflow-x: auto; }
  .tab { flex: 0 0 auto; }
  .search-box { width: 100%; }
  .mobile-section-filter { display: grid; gap: 7px; margin-bottom: 24px; }
  .mobile-section-filter label { color: var(--muted); font-size: 12px; }
  .mobile-section-filter select { width: 100%; padding: 11px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
  .thread-card { grid-template-columns: 42px minmax(0,1fr); padding: 17px 0; }
  .thread-stats { grid-column: 2; grid-template-columns: repeat(2, auto); justify-content: start; gap: 18px; text-align: left; }
  .thread-excerpt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .post { grid-template-columns: 1fr; }
  .post-profile { border-right: 0; border-bottom: 1px solid var(--line); }
  footer { align-items: flex-start; flex-wrap: wrap; padding: 20px 16px; }
  footer nav { width: 100%; margin-left: 0; }
}
