body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.header {
  background: var(--bg);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  max-width: none;
  margin: 0;
}

.header-inner {
  padding: 0 24px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-inner {}

@media (max-width: 1149px) {
  .header-inner {
    padding: 0;
  }
}

body {
  padding-top: 56px;
}

.header-logo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* Markdown content */
.md-content {
  color: var(--text);
  line-height: 1.75;
}

.md-content> :first-child {
  margin-top: 0;
}

.md-content> :last-child {
  margin-bottom: 0;
}

.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4,
.md-content h5,
.md-content h6 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 1.1em 0 0.5em;
}

.md-content h1 {
  font-size: 1.5rem;
}

.md-content h2 {
  font-size: 1.25rem;
}

.md-content h3 {
  font-size: 1.05rem;
}

.md-content p,
.md-content ul,
.md-content ol,
.md-content blockquote,
.md-content pre,
.md-content table {
  margin: 0 0 1em;
}

.md-content ul,
.md-content ol {
  padding-left: 1.25rem;
}

.md-content li+li {
  margin-top: 0.28rem;
}

.md-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.md-content a:hover {
  color: var(--accent-text);
}

.md-content strong {
  color: var(--text);
  font-weight: 600;
}

.md-content hr {
  border: 0;
  border-top: 0.5px solid var(--border);
  margin: 1.25em 0;
}

.md-content code {
  background: var(--bg);
  color: var(--accent-text);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 0.12rem 0.4rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
}

.md-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  border: 0.5px solid rgba(255, 255, 255, 0.06);
}

.md-content pre code {
  background: transparent;
  color: inherit;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 0.94em;
}

.md-content blockquote {
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.md-content table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: var(--surface);
  overflow: hidden;
}

.md-content .table-wrap {
  width: 100%;
  overflow-x: auto;

  border-radius: var(--radius);
  border: 0.5px solid var(--border);
  background: var(--surface);

  overflow: hidden;
  /* 👈 this clips the corners properly */
}

.md-content th,
.md-content td {
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--border);
  text-align: left;
  vertical-align: top;
  /* REMOVE nowrap */
}

.md-content th,
.md-content td {
  border-bottom: 0.5px solid var(--border);
}

.md-content tr:last-child td {
  border-bottom: none;
}

.md-content th:first-child {
  border-top-left-radius: var(--radius);
}

.md-content th:last-child {
  border-top-right-radius: var(--radius);
}

.md-content th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg);
}

.md-content tr:last-child td {
  border-bottom: none;
}

.dark .md-content pre {
  background: #13131f;
  color: #d7def7;
  border-color: rgba(255, 255, 255, 0.08);
}

.dark .md-content blockquote {
  background: rgba(255, 255, 255, 0.03);
}

.dark .md-content code {
  background: rgba(255, 255, 255, 0.04);
}

/* Codevre embeds */
.md-content .embed-wrap {
  margin: 1.2em 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 0.5px solid var(--border);
  background: var(--surface);
}

.md-content .embed-wrap iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}