.md-typeset {
  --md-default-fg-color: #111111;
  --md-default-fg-color--light: #555555;
  --md-default-fg-color--lighter: #777777;
  --md-default-bg-color: #fafafa;
}

:root {
  --md-primary-fg-color: #111111;
  --md-primary-fg-color--light: #111111;
  --md-primary-fg-color--dark: #000000;
  --md-accent-fg-color: #111111;
  --ui-border: rgba(17, 17, 17, 0.1);
  --ui-muted: #667085;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f5f7fa;
}

body {
  background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
}

.md-header,
.md-tabs {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ui-border);
}

.md-main__inner {
  max-width: 1180px;
}

.md-content {
  max-width: 900px;
  margin: 0 auto;
}

.md-typeset h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  margin-bottom: 0.8rem;
}

.md-typeset h2 {
  margin-top: 2.2rem;
  margin-bottom: 0.9rem;
  padding-left: 0.8rem;
  border-left: 4px solid #111111;
  letter-spacing: -0.02em;
}

.md-typeset h3 {
  margin-top: 1.5rem;
}

.md-typeset a {
  text-underline-offset: 0.18em;
}

.thread-feed {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

.thread-card,
.note-card,
.callout-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--ui-border);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.045);
}

.thread-card {
  padding: 1.15rem 1.25rem;
}

.thread-connector {
  position: relative;
  padding-left: 1.25rem;
}

.thread-connector::before {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.22), rgba(17, 17, 17, 0.02));
}

.thread-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  color: var(--ui-muted);
  font-size: 0.88rem;
}

.thread-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #6d6d6d 0%, #111111 70%);
  flex: none;
}

.thread-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #f1f1f1;
  color: #111111;
  font-size: 0.82rem;
  font-weight: 650;
}

.note-card,
.callout-card {
  padding: 1rem 1.1rem;
}

.callout-card {
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.04), rgba(255, 255, 255, 0.96));
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: 1rem 0 1.5rem;
}

.card {
  padding: 1.05rem 1.1rem;
  border-radius: 20px;
  border: 1px solid var(--ui-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.045);
}

.card h3,
.card p {
  margin-top: 0;
}

.card h3 {
  margin-bottom: 0.55rem;
}

.md-typeset table:not([class]) {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.04);
}

.md-typeset table:not([class]) th {
  background: #111111;
  color: #ffffff;
  white-space: nowrap;
}

.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
  border-color: var(--ui-border);
  min-width: 7rem;
}

.md-typeset blockquote {
  border-left-color: #111111;
  background: rgba(17, 17, 17, 0.035);
  border-radius: 0 16px 16px 0;
}

.md-typeset .admonition,
.md-typeset details {
  border-radius: 16px;
}

@media (max-width: 768px) {
  .md-content {
    max-width: 100%;
  }

  .md-typeset h1 {
    font-size: 2rem;
  }

  .thread-card,
  .note-card,
  .callout-card,
  .card {
    border-radius: 16px;
  }

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

  .md-typeset table:not([class]) {
    font-size: 0.82rem;
  }
}
