/* ============================================================
   Tema Workplace — internal collaboration tool stylesheet
   Pixel-faithful clone of Workplace from Meta circa 2026
   ============================================================ */

/* ---------- 0. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.34;
  color: #050505;
  background: #f0f2f5;
  -webkit-font-smoothing: antialiased;
}
a { color: #1B74E4; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ---------- 1. Layout shell ---------- */
.app {
  display: grid;
  grid-template-columns: 64px 280px 1fr;
  min-height: 100vh;
}

/* ---------- 2. Icon rail (far left) ---------- */
.rail {
  background: #fff;
  border-right: 1px solid #dadde1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.rail__logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1B74E4 0%, #0a5dc2 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
  margin-bottom: 12px;
}
.rail__btn {
  position: relative;
  width: 44px; height: 44px;
  border: none; background: transparent;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #65676B;
  transition: background 120ms;
}
.rail__btn:hover { background: #f0f2f5; color: #1B74E4; }
.rail__btn.is-active { color: #1B74E4; background: #e7f3ff; }
.rail__btn svg { width: 22px; height: 22px; }
.rail__badge {
  position: absolute;
  top: 4px; right: 4px;
  background: #e41E3F;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.rail__tooltip {
  position: absolute;
  left: 56px;
  background: #fff;
  color: #050505;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms;
  z-index: 50;
}
.rail__btn:hover .rail__tooltip { opacity: 1; }
.rail__spacer { flex: 1; }

/* ---------- 3. Left sidebar ---------- */
.sidebar {
  background: #fff;
  border-right: 1px solid #dadde1;
  padding: 12px 8px 24px;
  overflow-y: auto;
  height: 100vh;
  position: sticky;
  top: 0;
}
.searchbox {
  position: relative;
  margin: 4px 8px 16px;
}
.searchbox input {
  width: 100%;
  height: 36px;
  border: none;
  background: #f0f2f5;
  border-radius: 18px;
  padding: 0 14px 0 38px;
  font-size: 14px;
  color: #050505;
  outline: none;
}
.searchbox input:focus { background: #e4e6eb; }
.searchbox svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: #65676B;
}
.sidebar__section { margin-bottom: 10px; }
.sidebar__header {
  font-size: 17px;
  font-weight: 700;
  color: #050505;
  padding: 8px 12px 4px;
  margin: 0;
}
.sidebar__list { list-style: none; padding: 0; margin: 0; }
.sidebar__item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #050505;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.sidebar__item a:hover { background: #f0f2f5; text-decoration: none; }
.sidebar__item.is-active a {
  background: #e7f3ff;
  color: #1B74E4;
  font-weight: 600;
}
.sidebar__item.is-active a::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: #1B74E4;
}
.sidebar__icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: #e4e6eb;
  display: flex; align-items: center; justify-content: center;
  color: #1B74E4;
  flex-shrink: 0;
}
.sidebar__icon img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.sidebar__icon.is-round { border-radius: 50%; }
.sidebar__icon.is-round img { border-radius: 50%; }
.sidebar__see-more {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  color: #050505;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
}
.sidebar__see-more:hover { background: #f0f2f5; }
.sidebar__invite {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  color: #1B74E4;
  font-weight: 600;
  border-radius: 8px;
}
.sidebar__invite:hover { background: #f0f2f5; text-decoration: none; }
.sidebar__invite .sidebar__icon { background: #e7f3ff; }

/* ---------- 4. Main column ---------- */
.main {
  padding: 16px 24px 48px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}
.main__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 8px 0;
}
.main__logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1B74E4 0%, #6E2EBC 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px;
  letter-spacing: -0.5px;
}
.main__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: #050505;
}
.main__subtitle {
  font-size: 13px;
  color: #65676B;
  margin: 2px 0 0;
}

/* ---------- 5. Cards ---------- */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 16px;
  overflow: hidden;
}
.card__body { padding: 12px 16px 16px; }
.card__header {
  padding: 12px 16px;
  border-bottom: 1px solid #ced0d4;
  font-weight: 600;
  font-size: 16px;
}

/* ---------- 6. Composer ---------- */
.composer {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 16px;
}
.composer__tabs {
  display: flex;
  border-bottom: 1px solid #ced0d4;
  padding: 4px 8px;
}
.composer__tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #65676B;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.composer__tab:hover { background: #f0f2f5; }
.composer__tab.is-active { color: #1B74E4; }
.composer__row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
}
.composer__input {
  flex: 1;
  height: 40px;
  background: #f0f2f5;
  border-radius: 20px;
  padding: 0 16px;
  display: flex; align-items: center;
  color: #65676B;
  font-size: 15px;
}
.composer__chips {
  display: flex;
  border-top: 1px solid #ced0d4;
  padding: 4px 8px;
}
.composer__chip {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #65676B;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.composer__chip:hover { background: #f0f2f5; }

/* ---------- 7. Avatars ---------- */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c5d6ff 0%, #9fb8f0 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #1B74E4;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 16px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 32px; height: 32px; font-size: 13px; }
.avatar--lg { width: 80px; height: 80px; font-size: 28px; }
.avatar--xl { width: 168px; height: 168px; font-size: 56px; border: 4px solid #fff; }

/* ---------- 8. Posts ---------- */
.post { background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); margin-bottom: 16px; }
.post__header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px 8px;
}
.post__meta { flex: 1; min-width: 0; }
.post__author {
  font-size: 15px;
  font-weight: 600;
  color: #050505;
}
.post__author a { color: #050505; }
.post__author a:hover { text-decoration: underline; }
.post__group { color: #050505; font-weight: 600; }
.post__time {
  font-size: 13px;
  color: #65676B;
  margin-top: 1px;
}
.post__more {
  background: transparent;
  border: none;
  color: #65676B;
  font-size: 22px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
}
.post__more:hover { background: #f0f2f5; }
.post__body {
  padding: 0 16px 12px;
  font-size: 15px;
  line-height: 1.4;
  color: #050505;
  white-space: pre-wrap;
}
.post__body p { margin: 0 0 8px; }
.post__body p:last-child { margin-bottom: 0; }
.post__attachment {
  width: 100%;
  background: #f0f2f5;
}
.post__attachment img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
}
.post__attachment--doc {
  margin: 0 16px 12px;
  border: 1px solid #ced0d4;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.post__attachment--doc .doc-icon {
  width: 40px; height: 40px;
  border-radius: 6px;
  background: #e7f3ff;
  color: #1B74E4;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.post__attachment--doc .doc-meta { font-size: 13px; }
.post__attachment--doc .doc-title { color: #050505; font-weight: 600; }
.post__attachment--doc .doc-sub { color: #65676B; }

.post__reactions {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  font-size: 13px;
  color: #65676B;
  border-bottom: 1px solid #ced0d4;
}
.post__reactions-left { display: flex; align-items: center; gap: 4px; }
.reaction-emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1.5px #fff;
  font-size: 12px;
  margin-right: -4px;
}
.reaction-emoji.like { background: linear-gradient(135deg, #1B74E4, #4293ff); }
.reaction-emoji.heart { background: linear-gradient(135deg, #e91E63, #ff5b8b); }

.post__actions {
  display: flex;
  padding: 4px 8px;
}
.post__action {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #65676B;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
}
.post__action:hover { background: #f0f2f5; }
.post__action.is-liked { color: #1B74E4; }

/* ---------- 9. Comments ---------- */
.comments {
  padding: 8px 16px 12px;
  border-top: 1px solid #ced0d4;
}
.comments__toggle {
  background: transparent; border: none;
  color: #65676B; font-size: 14px; font-weight: 600;
  cursor: pointer; padding: 4px 0;
  margin-bottom: 6px;
}
.comments__toggle:hover { text-decoration: underline; }
.comments__hidden { display: none; }
.comments.is-expanded .comments__hidden { display: block; }
.comment {
  display: flex; gap: 8px;
  margin-bottom: 8px;
}
.comment__bubble {
  background: #f0f2f5;
  border-radius: 18px;
  padding: 8px 12px;
  max-width: 80%;
}
.comment__author { font-size: 13px; font-weight: 600; color: #050505; }
.comment__body { font-size: 14px; color: #050505; }
.comment__footer { font-size: 12px; color: #65676B; padding: 2px 12px; }
.comment__footer a { color: #65676B; font-weight: 600; }
.comment__footer a:hover { text-decoration: underline; }
.comment.is-deleted .comment__bubble {
  font-style: italic;
  color: #65676B;
}

/* ---------- 10. Profile pages ---------- */
.profile-cover {
  background: linear-gradient(135deg, #1B74E4 0%, #6E2EBC 60%, #c041d3 100%);
  height: 200px;
  border-radius: 0 0 8px 8px;
  position: relative;
  /* Reserve space below the cover for the absolutely-positioned profile-head:
     avatar (168px) hangs 104px below the cover, plus 24px breathing room. */
  margin-bottom: 128px;
}
.profile-head {
  position: absolute;
  bottom: -104px; left: 32px; right: 32px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.profile-head__name {
  /* Name sits fully below the cover, not on top of the gradient. */
  padding-bottom: 0;
  min-width: 0;
  flex: 1 1 240px;
}
.profile-head__name h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #050505;
  line-height: 1.25;
  word-break: break-word;
}
.profile-head__role {
  font-size: 14px;
  color: #65676B;
  margin: 2px 0 0;
}
.profile-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}
.profile-status.is-departed { background: #fde0e0; color: #b71c1c; }
.profile-status.is-active { background: #d6f5d6; color: #155724; }
.profile-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid #ced0d4;
  background: #fff;
  border-radius: 8px 8px 0 0;
}
.profile-tab {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #65676B;
  border: none;
  background: transparent;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.profile-tab.is-active {
  color: #1B74E4;
  border-bottom-color: #1B74E4;
}
.profile-tab:hover:not(.is-active) { background: #f0f2f5; color: #050505; }

.profile-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  margin-top: 16px;
}
.profile-about dl {
  margin: 0;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 12px;
  font-size: 14px;
}
.profile-about dt { color: #65676B; }
.profile-about dd { margin: 0; color: #050505; }

/* ---------- 11. File / Drive style ---------- */
.file-list {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.file-list__head, .file-list__row {
  display: grid;
  grid-template-columns: 1fr 160px 140px 100px;
  gap: 12px;
  padding: 12px 20px;
  align-items: center;
  font-size: 14px;
}
.file-list__head {
  background: #f0f2f5;
  color: #65676B;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.file-list__row {
  border-top: 1px solid #f0f2f5;
}
.file-list__row:hover { background: #f7f8fa; }
.file-list__name {
  display: flex; align-items: center; gap: 10px;
  color: #050505;
  font-weight: 500;
}
.file-list__name .doc-icon {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
}
.doc-icon.pdf { background: #d44638; }
.doc-icon.doc { background: #1B74E4; }
.doc-icon.xls { background: #1d8348; }
.doc-icon.zip { background: #6E2EBC; }
.doc-icon.img { background: #e67e22; }

/* ---------- 12. Knowledge / wiki style ---------- */
.kb-article {
  background: #fff;
  border-radius: 8px;
  padding: 32px 40px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  max-width: 820px;
}
.kb-article h1 { font-size: 28px; margin: 0 0 16px; }
.kb-article h2 { font-size: 20px; margin: 24px 0 8px; }
.kb-article h3 { font-size: 16px; margin: 16px 0 6px; }
.kb-article p { font-size: 15px; line-height: 1.55; margin: 0 0 12px; color: #050505; }
.kb-article ul, .kb-article ol { padding-left: 22px; margin: 0 0 12px; }
.kb-article li { font-size: 15px; line-height: 1.55; margin-bottom: 4px; }
.kb-article .meta {
  font-size: 13px;
  color: #65676B;
  border-bottom: 1px solid #ced0d4;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.kb-article blockquote {
  border-left: 3px solid #1B74E4;
  padding: 4px 12px;
  margin: 12px 0;
  background: #f0f7ff;
  color: #050505;
  font-size: 14px;
}
.kb-article .redacted {
  background: #050505;
  color: #050505;
  padding: 0 4px;
  user-select: all;
  border-radius: 2px;
}
.kb-article .redacted:hover { background: #2a2a2a; }
.kb-article code, .kb-article pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: #f0f2f5;
  border-radius: 4px;
}
.kb-article code { padding: 1px 5px; }
.kb-article pre { padding: 12px; overflow: auto; }

.kb-toc {
  background: #fff;
  border-radius: 8px;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  position: sticky;
  top: 16px;
}
.kb-toc h3 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; color: #65676B; letter-spacing: 0.5px; }
.kb-toc ul { list-style: none; padding: 0; margin: 0; }
.kb-toc li { margin-bottom: 4px; }
.kb-toc a { color: #050505; font-size: 14px; }
.kb-toc a:hover { color: #1B74E4; }

.kb-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}

/* ---------- 13. Group page ---------- */
.group-cover {
  background: linear-gradient(135deg, #6E2EBC 0%, #1B74E4 100%);
  height: 260px;
  border-radius: 8px;
  position: relative;
  margin-bottom: 16px;
  overflow: hidden;
}
.group-cover__title {
  position: absolute;
  bottom: 16px; left: 24px;
  color: #fff;
}
.group-cover__title h1 { margin: 0; font-size: 28px; font-weight: 700; }
.group-cover__title p { margin: 4px 0 0; font-size: 14px; opacity: 0.85; }
.group-private-banner {
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
}
.group-private-banner .lock {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #ffd54f;
  color: #5d4037;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.group-private-banner h3 { margin: 0 0 4px; font-size: 16px; }
.group-private-banner p { margin: 0; font-size: 14px; color: #5d4037; }

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.member-grid .member {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
}
.member-grid .member:hover { background: #f0f2f5; }
.member-grid .member span { font-size: 13px; font-weight: 500; }

/* ---------- 14. Dropdown panels (notifications / chat) ---------- */
.dropdown {
  position: fixed;
  left: 64px;
  top: 12px;
  width: 360px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 1000;
  max-height: 540px;
  overflow-y: auto;
  display: none;
}
.dropdown.is-open { display: block; }
.dropdown__header {
  padding: 16px 18px 8px;
  font-size: 20px;
  font-weight: 700;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.dropdown__list { padding: 4px; }
.dropdown__item {
  display: flex; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.dropdown__item:hover { background: #f0f2f5; }
.dropdown__item.is-unread { background: #e7f3ff; }
.dropdown__item.is-unread:hover { background: #d8eaff; }
.dropdown__body { flex: 1; }
.dropdown__body p { margin: 0; font-size: 14px; color: #050505; line-height: 1.35; }
.dropdown__body .time { font-size: 12px; color: #65676B; margin-top: 2px; display: block; }

/* ---------- 15. Insights / charts ---------- */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.insight-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.insight-card h3 { margin: 0 0 4px; font-size: 14px; color: #65676B; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.insight-card .big { font-size: 32px; font-weight: 700; color: #050505; }
.insight-card .trend { font-size: 13px; color: #43a047; margin-top: 2px; }
.insight-card .trend.is-down { color: #d44638; }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
  margin-top: 12px;
  padding: 0 4px;
}
.chart__bar {
  flex: 1;
  background: linear-gradient(180deg, #1B74E4, #0a5dc2);
  border-radius: 4px 4px 0 0;
  position: relative;
  cursor: pointer;
  transition: filter 120ms;
}
.chart__bar:hover { filter: brightness(1.1); }
.chart__bar[data-anomaly] {
  background: linear-gradient(180deg, #ff8a4c, #d44638);
}
.chart__bar .lbl {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #65676B;
  white-space: nowrap;
}

/* ---------- 16. Town hall list ---------- */
.townhall-item {
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.townhall-item h3 { margin: 0 0 4px; font-size: 16px; }
.townhall-item p { margin: 0; font-size: 13px; color: #65676B; }

.qa-block {
  margin-bottom: 18px;
  border-left: 3px solid #ced0d4;
  padding-left: 14px;
}
.qa-block.is-unanswered { border-left-color: #d44638; }
.qa-block .q { font-weight: 600; margin-bottom: 6px; }
.qa-block .a { color: #050505; }
.qa-block .a.is-empty { color: #d44638; font-style: italic; }

/* ---------- 17. Audio player ---------- */
.audio-player {
  background: #fff;
  border: 1px solid #ced0d4;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}
.audio-player__row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.audio-player button {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #ced0d4;
  background: #f0f2f5;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}
.audio-player button:hover { background: #e4e6eb; }
.audio-player button.is-active { background: #1B74E4; color: #fff; border-color: #1B74E4; }
.audio-player select { height: 32px; border: 1px solid #ced0d4; border-radius: 6px; padding: 0 6px; font-size: 13px; background: #fff; }
.audio-player progress { width: 100%; height: 6px; }

/* ---------- 18. Search results ---------- */
.search-result {
  background: #fff;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.search-result h3 { margin: 0 0 4px; font-size: 16px; }
.search-result h3 a { color: #1B74E4; }
.search-result p { margin: 0; font-size: 14px; color: #65676B; }
.search-empty {
  background: #fff;
  border-radius: 8px;
  padding: 48px 24px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  color: #65676B;
}
.search-empty h2 { color: #050505; margin: 0 0 8px; }

/* ---------- 19. Footer ---------- */
.app-footer {
  grid-column: 3;
  padding: 12px 24px 24px;
  font-size: 12px;
  color: #65676B;
  text-align: center;
}

/* ---------- 20. Misc helpers ---------- */
.flex { display: flex; }
.flex-1 { flex: 1; }
.muted { color: #65676B; }
.row-center { display: flex; align-items: center; gap: 8px; }
.tag {
  display: inline-block;
  background: #e4e6eb;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  color: #050505;
  font-weight: 500;
}
.tag.is-private { background: #fde0e0; color: #b71c1c; }
.tag.is-secret { background: #e0d7f5; color: #4527a0; }
.tag.is-open { background: #d6f5d6; color: #155724; }
.divider { height: 1px; background: #ced0d4; margin: 12px 0; }
.notice {
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #5d4037;
  margin-bottom: 12px;
}

/* ---------- 21. Org chart ---------- */
.org {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
}
.org__row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.org__node {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1px solid #ced0d4;
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 220px;
}
.org__node .name { font-weight: 600; font-size: 14px; }
.org__node .role { font-size: 12px; color: #65676B; }
.org__node.is-secret { border-style: dashed; border-color: #6E2EBC; background: #f7f2ff; }
.org__node.is-departed { opacity: 0.6; border-style: dotted; }

/* ---------- 22. 404 ---------- */
.empty-state {
  background: #fff;
  border-radius: 8px;
  padding: 80px 32px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.empty-state svg { width: 96px; height: 96px; color: #ced0d4; margin: 0 auto 16px; }
.empty-state h1 { font-size: 24px; margin: 0 0 8px; }
.empty-state p { color: #65676B; margin: 0 0 16px; }

/* ---------- 23. Responsive (basic) ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 64px 1fr; }
  .sidebar { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .kb-layout { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .main { padding: 12px 12px 48px; }
  .profile-cover { height: 140px; margin-bottom: 96px; }
  .profile-head { bottom: -84px; left: 16px; right: 16px; gap: 12px; }
  .avatar--xl { width: 104px; height: 104px; font-size: 36px; border-width: 3px; }
  .profile-head__name h1 { font-size: 22px; }
  .profile-head__role { font-size: 13px; }
  .profile-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .profile-about dl { grid-template-columns: 92px 1fr; }
}

/* ---------- 24. Unlock footer (ARG v2) ---------- */
/* The fixed #unlock-footer is 28px tall and overlays scrolling content.
   Add a sentinel scroll buffer so the last post/card is always reachable
   without being clipped by the footer. */
body { padding-bottom: 28px; }
.app { padding-bottom: 36px; }
#unlock-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 28px;
  line-height: 28px;
  background: #0b1d4d;
  color: #fff;
  font-size: 12px;
  text-align: center;
  z-index: 9999;
  letter-spacing: 0.3px;
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif;
  pointer-events: none;
}
#unlock-footer #unlock-count { font-weight: 700; }

/* ============================================================
   Dual-language content blocks (Change B — bilingual mirror)
   Used by /assets/js/i18n.js — it sets <html data-lang="zh|en">.
   HTML authors wrap mirrored bodies in:
     <div class="lang-content" lang="zh">...Chinese...</div>
     <div class="lang-content" lang="en">...English...</div>
   The whole counter-language tree is removed visually + a11y.
   ============================================================ */
html[data-lang="zh"] .lang-content[lang="en"],
html[data-lang="en"] .lang-content[lang="zh"] {
  display: none !important;
}
