/* GitHub Markdown CSS Framework */
/* Reset and base styles */
.github-md-body, .github-md-container, .github-md-section, 
.github-md-card, .github-md-header, .github-md-footer, 
.github-md-nav, .github-md-button {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

.github-md-body {
    background-color: #ffffff;
    color: #24292e;
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.github-md-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Typography - Exact GitHub styles */
.github-md-h1, .github-md-h2, .github-md-h3, .github-md-h4, .github-md-h5, .github-md-h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-top: 24px;
    margin-bottom: 16px;
}

.github-md-h1 {
    font-size: 2em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
}

.github-md-h2 {
    font-size: 1.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
}

.github-md-h3 {
    font-size: 1.25em;
}

.github-md-h4 {
    font-size: 1em;
}

.github-md-h5 {
    font-size: 0.875em;
}

.github-md-h6 {
    font-size: 0.85em;
    color: #6a737d;
}

.github-md-p {
    margin-top: 0;
    margin-bottom: 16px;
}

.github-md-strong {
    font-weight: 600;
}

.github-md-em {
    font-style: italic;
}

.github-md-del {
    text-decoration: line-through;
}

.github-md-code, .github-md-pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 85%;
}

.github-md-code {
    padding: 0.2em 0.4em;
    margin: 0;
    background-color: rgba(27,31,35,0.05);
    border-radius: 3px;
}

.github-md-pre {
    margin-top: 0;
    margin-bottom: 16px;
    padding: 16px;
    overflow: auto;
    background-color: #f6f8fa;
    border-radius: 3px;
    line-height: 1.45;
}

.github-md-pre .github-md-code {
    padding: 0;
    background-color: transparent;
}

.github-md-blockquote {
    padding: 0 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
    margin: 0 0 16px 0;
}

.github-md-hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: #e1e4e8;
    border: 0;
}

/* Links */
.github-md-a {
    color: #0366d6;
    text-decoration: none;
}

.github-md-a:hover {
    text-decoration: underline;
}

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

.github-md-li {
    margin-bottom: 0.25em;
}

.github-md-li > .github-md-p {
    margin-bottom: 0.25em;
}

.github-md-task-list-item {
    list-style-type: none;
}

.github-md-task-list-item input {
    margin: 0 0.2em 0.25em -1.6em;
    vertical-align: middle;
}

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

.github-md-th, .github-md-td {
    padding: 6px 13px;
    border: 1px solid #dfe2e5;
}

.github-md-th {
    font-weight: 600;
    background-color: #f6f8fa;
}

.github-md-tr:nth-child(2n) {
    background-color: #f6f8fa;
}

/* Images */
.github-md-img {
    max-width: 100%;
    height: auto;
    background-color: #ffffff;
    border-radius: 3px;
    box-sizing: content-box;
}

/* Layout system */
.github-md-grid {
    display: grid;
    grid-gap: 16px;
}

.github-md-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.github-md-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.github-md-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Cards - GitHub doesn't use cards but we'll create GitHub-style boxes */
.github-md-card {
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 16px;
    background: #ffffff;
}

.github-md-card-header {
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 8px;
    margin-bottom: 16px;
    font-size: 1.25em;
    font-weight: 600;
}

.github-md-card-footer {
    border-top: 1px solid #e1e4e8;
    padding-top: 16px;
    margin-top: 16px;
    color: #6a737d;
}

/* Navigation - GitHub-like header */
.github-md-nav {
    display: flex;
    flex-wrap: wrap;
    padding: 16px 0;
    border-bottom: 1px solid #e1e4e8;
    margin-bottom: 24px;
    align-items: center;
    font-size: 14px;
}

.github-md-nav-item {
    margin-right: 16px;
    text-decoration: none;
    color: #24292e;
    font-weight: 600;
}

.github-md-nav-item:hover {
    color: #0366d6;
}

/* Buttons - GitHub button style */
.github-md-button {
    display: inline-block;
    padding: 5px 16px;
    background-color: #fafbfc;
    border: 1px solid rgba(27,31,35,0.15);
    border-radius: 6px;
    color: #24292e;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.github-md-button:hover {
    background-color: #f3f4f6;
}

.github-md-button-primary {
    background-color: #2ea44f;
    color: #ffffff;
    border-color: rgba(27,31,35,0.15);
}

.github-md-button-primary:hover {
    background-color: #2c974b;
}

/* Forms - GitHub style inputs */
.github-md-form {
    margin-bottom: 16px;
}

.github-md-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.github-md-input, .github-md-textarea, .github-md-select {
    display: block;
    width: 100%;
    padding: 5px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 16px;
    background-color: #fafbfc;
    line-height: 20px;
}

.github-md-textarea {
    min-height: 100px;
    resize: vertical;
}

.github-md-input:focus, .github-md-textarea:focus, .github-md-select:focus {
    border-color: #0366d6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(3,102,214,0.3);
}

/* Alerts/Notes - GitHub style notices */
.github-md-note {
    padding: 16px;
    border-left: 4px solid;
    margin-bottom: 16px;
    border-radius: 0 6px 6px 0;
}

.github-md-note-info {
    background-color: #f1f8ff;
    border-left-color: #0366d6;
}

.github-md-note-warning {
    background-color: #fffbdd;
    border-left-color: #ffd33d;
}

.github-md-note-danger {
    background-color: #ffebe9;
    border-left-color: #cf222e;
}

/* Utility classes */
.github-md-text-center { text-align: center; }
.github-md-text-right { text-align: right; }
.github-md-text-left { text-align: left; }

.github-md-mt-0 { margin-top: 0; }
.github-md-mt-1 { margin-top: 4px; }
.github-md-mt-2 { margin-top: 8px; }
.github-md-mt-3 { margin-top: 16px; }
.github-md-mt-4 { margin-top: 24px; }

.github-md-mb-0 { margin-bottom: 0; }
.github-md-mb-1 { margin-bottom: 4px; }
.github-md-mb-2 { margin-bottom: 8px; }
.github-md-mb-3 { margin-bottom: 16px; }
.github-md-mb-4 { margin-bottom: 24px; }

.github-md-pt-0 { padding-top: 0; }
.github-md-pt-1 { padding-top: 4px; }
.github-md-pt-2 { padding-top: 8px; }
.github-md-pt-3 { padding-top: 16px; }
.github-md-pt-4 { padding-top: 24px; }

.github-md-pb-0 { padding-bottom: 0; }
.github-md-pb-1 { padding-bottom: 4px; }
.github-md-pb-2 { padding-bottom: 8px; }
.github-md-pb-3 { padding-bottom: 16px; }
.github-md-pb-4 { padding-bottom: 24px; }

.github-md-hidden { display: none; }
.github-md-block { display: block; }
.github-md-inline { display: inline; }
.github-md-flex { display: flex; }
.github-md-inline-block { display: inline-block; }

/* Responsive design */
@media (max-width: 768px) {
    .github-md-grid-2, .github-md-grid-3, .github-md-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .github-md-nav {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .github-md-nav-item {
        margin-bottom: 8px;
    }
    
    .github-md-container {
        padding: 0 8px;
    }
}

/* Dark theme - GitHub dark mode */
@media (prefers-color-scheme: dark) {
    .github-md-body {
        color: #f0f6fc;
        background-color: #0d1117;
    }
    
    .github-md-card {
        background-color: #161b22;
        border-color: #30363d;
    }
    
    .github-md-code {
        background-color: rgba(240,246,252,0.15);
    }
    
    .github-md-pre {
        background-color: #161b22;
    }
    
    .github-md-blockquote {
        color: #8b949e;
        border-left-color: #30363d;
    }
    
    .github-md-h1, .github-md-h2 {
        border-bottom-color: #30363d;
    }
    
    .github-md-hr {
        background-color: #21262d;
    }
    
    .github-md-th, .github-md-td {
        border-color: #30363d;
    }
    
    .github-md-th {
        background-color: #161b22;
    }
    
    .github-md-tr:nth-child(2n) {
        background-color: #161b22;
    }
    
    .github-md-nav {
        border-bottom-color: #30363d;
    }
    
    .github-md-nav-item {
        color: #f0f6fc;
    }
    
    .github-md-button {
        background-color: #21262d;
        border-color: #30363d;
        color: #f0f6fc;
    }
    
    .github-md-button:hover {
        background-color: #30363d;
    }
    
    .github-md-button-primary {
        background-color: #238636;
    }
    
    .github-md-button-primary:hover {
        background-color: #2ea043;
    }
    
    .github-md-input, .github-md-textarea, .github-md-select {
        background-color: #0d1117;
        border-color: #30363d;
        color: #f0f6fc;
    }
    
    .github-md-note-info {
        background-color: rgba(56,139,253,0.1);
        border-left-color: #388bfd;
    }
    
    .github-md-note-warning {
        background-color: rgba(255,217,61,0.1);
        border-left-color: #ffd43b;
    }
    
    .github-md-note-danger {
        background-color: rgba(248,81,73,0.1);
        border-left-color: #f85149;
    }
}