:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --ink: #202321;
  --muted: #666d68;
  --line: #d9ded7;
  --green: #28745d;
  --green-dark: #1f5b49;
  --red: #b3433f;
  --yellow: #b27a1f;
  --blue: #2c638e;
  --shadow: 0 8px 26px rgba(36, 41, 38, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
  border-radius: 6px;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}

button.secondary {
  background: var(--surface);
  color: var(--green-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  padding: 10px 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(40, 116, 93, 0.14);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 9;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(250px, 370px) minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
  padding: 10px 18px;
}

.board-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: calc(100vh - 72px);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #fbfcfa;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - 72px);
  overflow: auto;
}

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

.brand h1 {
  font-size: 19px;
  line-height: 1.15;
}

.brand p {
  margin-top: 3px;
}

.mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-weight: 800;
  font-size: 22px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 21px;
}

h2 {
  font-size: 17px;
}

h3 {
  font-size: 15px;
}

.muted,
.brand p,
.meta {
  color: var(--muted);
}

.channel-list {
  display: grid;
  gap: 14px;
}

.side-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-note {
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.35;
}

.channel-section {
  display: grid;
  gap: 6px;
}

.tool-section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.channel-section h2 {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.channel {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  min-height: auto;
  padding: 10px;
}

.channel.active {
  background: var(--surface-2);
  border-color: var(--line);
}

.channel-title {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.channel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.quick-search {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.quick-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 8;
  max-height: min(460px, 70vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 6px;
}

.quick-result {
  width: 100%;
  display: grid;
  gap: 4px;
  min-height: auto;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 9px;
}

.quick-result:hover,
.quick-result:focus {
  border-color: var(--line);
  background: var(--surface-2);
}

.quick-kind {
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-title {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.quick-excerpt {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.quick-empty {
  padding: 10px;
  color: var(--muted);
}

.auth-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.account-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 4px 10px 4px 4px;
}

.account-chip:hover,
.account-chip:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(40, 116, 93, 0.12);
}

.account-chip span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfeee8;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.account-chip strong {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-panel {
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
  padding: 16px;
}

.auth-card {
  width: min(720px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.auth-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.auth-card-head h2 {
  font-size: 23px;
  margin-top: 3px;
}

.auth-card-head p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.4;
  margin-top: 5px;
}

.auth-form {
  display: grid;
  gap: 9px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.locked-author {
  background: var(--surface-2);
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr) 300px;
  min-width: 0;
}

.thread-column,
.detail-column,
.inspector {
  min-width: 0;
  height: calc(100vh - 72px);
  overflow: auto;
}

.thread-column {
  border-right: 1px solid var(--line);
  padding: 16px;
}

.detail-column {
  padding: 20px;
}

.inspector {
  border-left: 1px solid var(--line);
  background: #fbfcfa;
  padding: 16px;
}

.board-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.board-header h2 {
  font-size: 24px;
  line-height: 1.15;
}

.board-header p {
  color: var(--muted);
  line-height: 1.4;
}

.eyebrow {
  color: var(--green-dark) !important;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.board-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toolbar {
  margin: 12px 0;
}

.composer,
.reply-form,
.video-form,
.upload-form,
.wiki-form {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.composer {
  border-color: rgba(40, 116, 93, 0.35);
  margin-bottom: 12px;
}

.composer-intro {
  display: grid;
  gap: 4px;
}

.composer-intro p {
  color: var(--muted);
  line-height: 1.35;
}

.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.thread-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.thread-item,
.post,
.video-item,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.thread-item {
  padding: 12px;
  cursor: pointer;
}

.thread-item.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(40, 116, 93, 0.12);
}

.thread-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.badge.review {
  background: #f9e4df;
  color: var(--red);
}

.badge.watch {
  background: #f7ead2;
  color: var(--yellow);
}

.badge.done {
  background: #dfeee8;
  color: var(--green-dark);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.thread-summary {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.4;
}

.detail-header {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-header h2 {
  font-size: 24px;
}

.forum-home {
  display: grid;
  gap: 16px;
}

.forum-board-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.forum-board-top h2 {
  font-size: 28px;
  line-height: 1.12;
}

.forum-board-top p:not(.eyebrow) {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 5px;
}

.home-actions,
.section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.section-heading {
  justify-content: space-between;
}

.section-heading h2 {
  font-size: 19px;
}

.section-heading p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.4;
}

.forum-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.forum-stat-strip.compact {
  grid-column: 1 / -1;
}

.forum-stat-strip div,
.how-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
}

.forum-stat-strip strong {
  display: block;
  color: var(--green-dark);
  font-size: 26px;
  line-height: 1;
}

.forum-stat-strip span,
.how-grid span {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.forum-front-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.forum-social-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.78fr);
  gap: 14px;
  align-items: start;
}

.social-feed-panel,
.forum-directory-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.social-feed-head,
.directory-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.social-feed-head h2,
.directory-head h2 {
  font-size: 17px;
}

.social-feed-head p,
.directory-head span {
  color: var(--muted);
  line-height: 1.35;
}

.social-feed-head > span {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.social-feed-list {
  display: grid;
}

.social-feed-card {
  width: 100%;
  min-height: auto;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  padding: 14px;
}

.social-feed-card:last-child {
  border-bottom: 0;
}

.social-feed-card:hover,
.social-feed-card:focus {
  background: #fbfcfa;
  box-shadow: inset 3px 0 0 var(--green);
}

.feed-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfeee8;
  color: var(--green-dark);
  font-weight: 900;
}

.feed-card-body {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.feed-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.feed-card-meta strong {
  color: var(--ink);
  font-size: 14px;
}

.feed-card-meta em,
.feed-card-action {
  color: var(--muted);
  font-style: normal;
}

.feed-card-title {
  color: var(--green-dark);
  font-size: 17px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.feed-card-excerpt {
  color: var(--ink);
  line-height: 1.48;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.feed-card-action {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.forum-directory-list {
  max-height: 720px;
  overflow: auto;
}

.forum-directory-panel .forum-table-head {
  display: none;
}

.forum-directory-panel .forum-index-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.forum-directory-panel .forum-row-latest {
  grid-column: 1 / -1;
  padding-top: 4px;
}

.forum-index-panel,
.latest-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.forum-table-head,
.forum-index-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 72px 72px minmax(170px, 0.7fr);
  gap: 10px;
  align-items: center;
}

.forum-table-head {
  min-height: 36px;
  padding: 0 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.forum-category-title {
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.forum-index-row {
  width: 100%;
  min-height: 74px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  padding: 12px;
}

.forum-index-row:last-child {
  border-bottom: 0;
}

.forum-index-row:hover,
.forum-index-row:focus {
  background: #fbfcfa;
  box-shadow: inset 3px 0 0 var(--green);
}

.forum-row-main,
.forum-row-latest {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.forum-row-main strong,
.forum-row-latest strong {
  overflow-wrap: anywhere;
}

.forum-row-main small,
.forum-row-latest small {
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.forum-row-stat {
  color: var(--green-dark);
  font-weight: 800;
  text-align: center;
}

.latest-panel {
  display: grid;
}

.latest-panel-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.latest-panel-head h2 {
  font-size: 15px;
}

.latest-panel-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.latest-activity-scroll {
  max-height: 560px;
  overflow: auto;
}

.latest-activity-item {
  width: 100%;
  min-height: auto;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  padding: 11px 12px;
}

.latest-activity-item:last-child {
  border-bottom: 0;
}

.latest-activity-item:hover,
.latest-activity-item:focus {
  background: #fbfcfa;
}

.activity-kind {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
}

.activity-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.activity-body strong,
.activity-body small {
  overflow-wrap: anywhere;
}

.activity-body small {
  color: var(--muted);
  line-height: 1.35;
}

.activity-body em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.home-section {
  display: grid;
  gap: 12px;
}

.home-topic-list {
  display: grid;
  gap: 8px;
}

.home-topic,
.space-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  min-height: auto;
}

.home-topic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px;
}

.home-topic:hover,
.home-topic:focus,
.space-card:hover,
.space-card:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(40, 116, 93, 0.12);
}

.home-topic small,
.space-card span {
  display: block;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 5px;
}

.home-topic em,
.space-card em {
  color: var(--green-dark);
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}

.space-card-grid,
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.space-card {
  display: grid;
  gap: 6px;
  padding: 13px;
}

.how-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.how-grid strong {
  display: block;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-list,
.video-list,
.stack {
  display: grid;
  gap: 12px;
}

.post-list {
  margin: 18px 0;
}

.post {
  padding: 13px;
}

.post.highlight {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 99, 142, 0.14);
}

.post-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.member-link {
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--green-dark);
  padding: 0;
  font-weight: 800;
}

.member-link:hover,
.member-link:focus {
  text-decoration: underline;
  box-shadow: none;
}

.post-body {
  white-space: pre-wrap;
  line-height: 1.5;
}

.video-item {
  overflow: hidden;
}

.video-meta {
  padding: 12px;
  display: grid;
  gap: 4px;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border: 0;
  display: block;
}

.video-frame video {
  width: 100%;
  height: 100%;
}

.video-feed {
  display: grid;
  gap: 12px;
}

.video-card,
.related-video {
  cursor: pointer;
}

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.video-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(40, 116, 93, 0.12);
}

.video-card-body {
  padding: 11px;
  display: grid;
  gap: 5px;
}

.video-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: #171b1c;
  color: white;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb.generated {
  padding: 16px;
  text-align: center;
  background: linear-gradient(145deg, #17201d, #315446);
}

.video-thumb.generated span {
  line-height: 1.25;
}

.video-thumb.generated strong,
.play-chip {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  padding: 4px 8px;
  font-size: 12px;
}

.watch-view,
.video-studio,
.wiki-view,
.intel-view,
.vault-view,
.profile-page {
  display: grid;
  gap: 14px;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.profile-page.theme-notebook .profile-hero {
  background: #fffdfa;
}

.profile-page.theme-lab .profile-hero {
  background: #f8fbfc;
}

.profile-page.theme-cosmos .profile-hero {
  background: #f9f8ff;
}

.profile-avatar {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfeee8;
  color: var(--green-dark);
  font-size: 26px;
  font-weight: 900;
}

.profile-identity {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.profile-identity h2 {
  font-size: 30px;
  line-height: 1.12;
}

.profile-identity p:not(.eyebrow),
.profile-section p {
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

.profile-meta-line,
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.profile-meta-line span {
  color: var(--muted);
  font-size: 12px;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat-grid div,
.profile-section,
.profile-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-stat-grid div {
  padding: 13px;
}

.profile-stat-grid strong {
  display: block;
  color: var(--green-dark);
  font-size: 23px;
  line-height: 1;
}

.profile-stat-grid span {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.profile-section,
.profile-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.profile-chip-list,
.profile-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-chip-list span,
.profile-link-list a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--green-dark);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.profile-status {
  border-left: 3px solid var(--green);
  padding-left: 10px;
}

.profile-wall-row,
.profile-result {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--ink);
  text-decoration: none;
}

.profile-wall-row:first-of-type,
.profile-result:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.profile-wall-row span,
.profile-result span,
.profile-wall-row em,
.profile-result em {
  color: var(--muted);
  line-height: 1.35;
  font-style: normal;
}

.profile-wall-row em,
.profile-result em {
  font-size: 12px;
}

.profile-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.profile-activity-item {
  width: 100%;
  text-align: left;
}

.intel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.intel-row {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.intel-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.mini-form {
  display: grid;
  gap: 8px;
}

.wiki-body {
  white-space: pre-wrap;
  line-height: 1.6;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.wiki-form textarea {
  min-height: 220px;
}

.revision-row {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.revision-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.watch-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f1111;
  border-radius: 8px;
  overflow: hidden;
}

.watch-player iframe,
.watch-player video,
.admin-upload-preview,
.admin-upload-preview video,
.public-video-player iframe,
.public-video-player video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.admin-upload-preview {
  display: grid;
  place-items: center;
  color: white;
  padding: 16px;
}

.watch-meta {
  display: grid;
  gap: 8px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--green-dark);
  text-decoration: none;
  background: var(--surface);
}

.transcript-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.transcript-panel p {
  white-space: pre-wrap;
  line-height: 1.55;
}

.related-videos {
  display: grid;
  gap: 10px;
}

.related-video {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
}

.video-studio {
  margin-top: 18px;
}

.video-studio h2 {
  font-size: 18px;
}

.panel {
  padding: 13px;
  display: grid;
  gap: 10px;
}

.panel + .panel {
  margin-top: 12px;
}

.ai-result {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  background: #f3f5f2;
  border-radius: 6px;
  padding: 10px;
  max-height: 220px;
  overflow: auto;
}

.empty-state {
  min-height: calc(100vh - 40px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 8px;
  background: #202321;
  color: white;
  box-shadow: var(--shadow);
  z-index: 5;
}

.public-page {
  min-height: 100vh;
}

.public-header {
  height: 58px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;
}

.public-brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.public-header nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.public-header a,
.public-article a {
  color: var(--green-dark);
}

.public-main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.public-article {
  display: grid;
  gap: 16px;
}

.public-article h1 {
  font-size: 32px;
  line-height: 1.15;
}

.public-post-body {
  white-space: pre-wrap;
  line-height: 1.65;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.video-public-main {
  width: min(1080px, calc(100% - 32px));
}

.public-video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #0f1111;
  overflow: hidden;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: white;
  padding: 20px;
  text-align: center;
}

.public-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.public-video-grid .video-card {
  color: var(--ink);
  text-decoration: none;
}

.public-video-library .video-card {
  display: grid;
}

.public-video-library .thread-summary {
  display: block;
}

.video-thumb-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: white;
  background: #17201d;
  font-weight: 700;
}

.public-section,
.public-list {
  display: grid;
  gap: 12px;
}

@media (max-width: 1180px) {
  .board-shell {
    grid-template-columns: 260px 1fr;
  }

  .workspace {
    grid-template-columns: minmax(310px, 380px) minmax(0, 1fr);
  }

  .inspector {
    display: none;
  }

  .space-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forum-front-grid {
    grid-template-columns: 1fr;
  }

  .forum-social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar,
  .board-shell,
  .workspace {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
  }

  .auth-controls {
    justify-content: stretch;
  }

  .auth-controls button {
    flex: 1;
  }

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

  .sidebar,
  .thread-column,
  .detail-column,
  .inspector {
    height: auto;
    overflow: visible;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .thread-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .board-header {
    grid-template-columns: 1fr;
  }

  .board-actions {
    justify-content: stretch;
  }

  .board-actions button {
    flex: 1;
  }

  .related-video {
    grid-template-columns: 1fr;
  }

  .forum-board-top {
    grid-template-columns: 1fr;
  }

  .forum-board-top h2 {
    font-size: 25px;
  }

  .forum-stat-strip,
  .space-card-grid,
  .how-grid {
    grid-template-columns: 1fr;
  }

  .forum-table-head {
    display: none;
  }

  .forum-index-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .forum-directory-panel .forum-index-row {
    grid-template-columns: 1fr;
  }

  .social-feed-card {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 12px;
  }

  .feed-avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .forum-row-stat {
    text-align: left;
  }

  .forum-row-stat::after {
    color: var(--muted);
    font-weight: 400;
  }

  .home-topic {
    grid-template-columns: 1fr;
  }

  .home-topic em {
    white-space: normal;
  }

  .intel-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero,
  .profile-grid,
  .profile-editor-grid {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    align-items: stretch;
  }

  .profile-actions button,
  .profile-actions .button-link {
    justify-content: center;
  }

  .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-header {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .public-article h1 {
    font-size: 25px;
  }
}
