/* Microsoft Tech Community style */
:root {
  --ms-blue: #0078d4;
  --ms-blue-dark: #005a9e;
  --ms-bg: #f3f2f1;
  --ms-card: #ffffff;
  --ms-text: #242424;
  --ms-muted: #605e5c;
  --ms-border: #edebe9;
  --ms-font: 'Segoe UI', SegoeUI, system-ui, -apple-system, sans-serif;
  --ms-radius: 4px;
}

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

body {
  margin: 0;
  font-family: var(--ms-font);
  background: var(--ms-bg);
  color: var(--ms-text);
  line-height: 1.5;
}

a { color: var(--ms-blue); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--ms-blue-dark); }

.ms-header {
  background: var(--ms-card);
  border-bottom: 1px solid var(--ms-border);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.ms-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ms-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ms-text);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.ms-logo:hover { text-decoration: none; color: var(--ms-text); }

.ms-logo-squares {
  display: grid;
  grid-template-columns: 10px 10px;
  gap: 2px;
}

.ms-logo-squares span:nth-child(1) { background: #f25022; }
.ms-logo-squares span:nth-child(2) { background: #7fba00; }
.ms-logo-squares span:nth-child(3) { background: #00a4ef; }
.ms-logo-squares span:nth-child(4) { background: #ffb900; }

.ms-logo-squares span {
  width: 10px;
  height: 10px;
  display: block;
}

.ms-nav {
  display: flex;
  gap: 1.25rem;
  margin-left: 1rem;
}

.ms-nav a {
  color: var(--ms-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

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

.ms-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  gap: 1.25rem;
}

.ms-sidebar h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ms-muted);
  margin: 0 0 0.75rem;
}

.ms-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ms-sidebar li { margin-bottom: 0.35rem; }

.ms-sidebar a {
  font-size: 0.875rem;
  color: var(--ms-text);
}

.ms-card {
  background: var(--ms-card);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}

.ms-card:hover { border-color: #c8c6c4; }

.ms-thread-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--ms-muted);
}

.ms-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ms-thread-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.ms-thread-title a { color: var(--ms-text); }
.ms-thread-title a:hover { color: var(--ms-blue); text-decoration: none; }

.ms-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0; }

.ms-tag {
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  background: #eff6fc;
  color: var(--ms-blue-dark);
  border-radius: 2px;
  font-weight: 600;
}

.ms-tag:hover { background: #deecf9; text-decoration: none; }

.ms-thread-meta {
  font-size: 0.8rem;
  color: var(--ms-muted);
  display: flex;
  gap: 0.85rem;
}

.ms-feed-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.ms-article { background: var(--ms-card); border: 1px solid var(--ms-border); border-radius: var(--ms-radius); padding: 1.5rem 2rem; }

.ms-article h1 { font-size: 1.75rem; margin: 0 0 1rem; line-height: 1.25; }

.ms-article-body { font-size: 1rem; line-height: 1.65; }
.ms-article-body h2 { font-size: 1.2rem; margin: 1.5rem 0 0.65rem; }
.ms-article-body h4 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }
.ms-article-body p { margin: 0 0 0.85rem; }
.ms-article-body ul, .ms-article-body ol { margin: 0 0 1rem 1.25rem; }
.ms-article-body li { margin-bottom: 0.35rem; }
.ms-article-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.9rem; }
.ms-article-body th, .ms-article-body td { border: 1px solid var(--ms-border); padding: 0.5rem; text-align: left; }

.ms-replies { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--ms-border); }
.ms-replies h2 { font-size: 1.1rem; margin-bottom: 1rem; }

.ms-reply {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ms-border);
}

.ms-reply-author { font-weight: 600; font-size: 0.875rem; }
.ms-reply p { margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--ms-muted); }

.ms-footer {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ms-muted);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.25rem 0;
}

.page-link {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--ms-border);
  background: var(--ms-card);
  border-radius: var(--ms-radius);
  font-size: 0.85rem;
  color: var(--ms-text);
}

.page-link.active { background: var(--ms-blue); color: #fff; border-color: var(--ms-blue); }
.page-link:hover { text-decoration: none; background: #faf9f8; }

@media (max-width: 960px) {
  .ms-layout { grid-template-columns: 1fr; }
  .ms-sidebar-left { display: none; }
}
