/* GitHub-style markdown rendering */

/* Markdown content container */
.markdown-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #24292f;
    background-color: white;
    padding: 40px;
    max-width: 900px;
    margin: 20px auto;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

/* Headings */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: #1f2328;
}

.markdown-content h1 {
    font-size: 2em;
    border-bottom: 1px solid #d0d7de;
    padding-bottom: 0.3em;
    margin-top: 0;
}

.markdown-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #d0d7de;
    padding-bottom: 0.3em;
}

.markdown-content h3 {
    font-size: 1.25em;
}

.markdown-content h4 {
    font-size: 1em;
}

.markdown-content h5 {
    font-size: 0.875em;
}

.markdown-content h6 {
    font-size: 0.85em;
    color: #656d76;
}

/* Paragraphs */
.markdown-content p {
    margin-top: 0;
    margin-bottom: 16px;
}

/* Links */
.markdown-content a {
    color: #0969da;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

/* Lists */
.markdown-content ul,
.markdown-content ol {
    margin-top: 0;
    margin-bottom: 16px;
    padding-left: 2em;
}

.markdown-content li {
    margin-top: 0.25em;
}

.markdown-content li + li {
    margin-top: 0.25em;
}

/* Code blocks */
.markdown-content pre {
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    margin-bottom: 16px;
}

.markdown-content code {
    background-color: rgba(175,184,193,0.2);
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
    font-size: 100%;
    border-radius: 0;
}

/* Code blocks with syntax highlighting */
.markdown-content .codehilite {
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
    overflow: auto;
}

.markdown-content .codehilite pre {
    background-color: transparent;
    padding: 0;
    margin: 0;
    overflow: visible;
}

/* Blockquotes */
.markdown-content blockquote {
    padding: 0 1em;
    color: #656d76;
    border-left: 0.25em solid #d0d7de;
    margin: 0 0 16px 0;
}

.markdown-content blockquote > :first-child {
    margin-top: 0;
}

.markdown-content blockquote > :last-child {
    margin-bottom: 0;
}

/* Horizontal rules */
.markdown-content hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: #d0d7de;
    border: 0;
}

/* Tables */
.markdown-content table {
    border-spacing: 0;
    border-collapse: collapse;
    margin-top: 0;
    margin-bottom: 16px;
    display: block;
    width: max-content;
    max-width: 100%;
    overflow: auto;
}

.markdown-content table tr {
    background-color: #ffffff;
    border-top: 1px solid #d0d7de;
}

.markdown-content table tr:nth-child(2n) {
    background-color: #f6f8fa;
}

.markdown-content table th,
.markdown-content table td {
    padding: 6px 13px;
    border: 1px solid #d0d7de;
}

.markdown-content table th {
    font-weight: 600;
    background-color: #f6f8fa;
}

/* Images */
.markdown-content img {
    max-width: 100%;
    box-sizing: content-box;
    background-color: #ffffff;
}

/* Strong and emphasis */
.markdown-content strong {
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}

/* Task lists */
.markdown-content input[type="checkbox"] {
    margin-right: 0.5em;
}

/* Nested lists spacing */
.markdown-content ul ul,
.markdown-content ul ol,
.markdown-content ol ol,
.markdown-content ol ul {
    margin-top: 0;
    margin-bottom: 0;
}
