<!--
Copyright (C) 2026 Stefy Lanza <stefy@nexlab.net>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
-->
{% extends "base.html" %}

{% block title %}{{ title }} - AISBF Dashboard{% endblock %}

{% block content %}
<style>
    .markdown-content {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        line-height: 1.6;
        color: #e0e0e0;
        max-width: 100%;
        overflow-x: auto;
    }
    .markdown-content pre {
        background: #0f3460;
        padding: 16px;
        border-radius: 6px;
        overflow-x: auto;
        border: 1px solid #1a4a7a;
        font-family: 'Courier New', Consolas, Monaco, monospace;
        font-size: 13px;
        line-height: 1.45;
        color: #e0e0e0;
    }
    .markdown-content code {
        background: #0f3460;
        padding: 2px 6px;
        border-radius: 3px;
        font-family: 'Courier New', Consolas, Monaco, monospace;
        font-size: 13px;
        color: #e0e0e0;
    }
    .markdown-content h1 {
        font-size: 2em;
        border-bottom: 2px solid #e94560;
        padding-bottom: 0.3em;
        margin-top: 24px;
        margin-bottom: 16px;
        color: #ffffff;
    }
    .markdown-content h2 {
        font-size: 1.5em;
        border-bottom: 1px solid #0f3460;
        padding-bottom: 0.3em;
        margin-top: 24px;
        margin-bottom: 16px;
        color: #ffffff;
    }
    .markdown-content h3 {
        font-size: 1.25em;
        margin-top: 24px;
        margin-bottom: 16px;
        color: #ffffff;
    }
    .markdown-content h4, .markdown-content h5, .markdown-content h6 {
        color: #ffffff;
    }
    .markdown-content ul, .markdown-content ol {
        padding-left: 2em;
        margin-bottom: 16px;
    }
    .markdown-content li {
        margin-bottom: 4px;
    }
    .markdown-content p {
        margin-bottom: 16px;
    }
    .markdown-content a {
        color: #e94560;
        text-decoration: none;
    }
    .markdown-content a:hover {
        text-decoration: underline;
    }
    .markdown-content blockquote {
        padding: 0 1em;
        color: #a0a0a0;
        border-left: 4px solid #e94560;
        margin-bottom: 16px;
    }
    .markdown-content table {
        border-collapse: collapse;
        width: 100%;
        margin-bottom: 16px;
    }
    .markdown-content table th,
    .markdown-content table td {
        padding: 6px 13px;
        border: 1px solid #0f3460;
    }
    .markdown-content table th {
        background: #0f3460;
        font-weight: 600;
    }
    .markdown-content table tr:nth-child(2n) {
        background: #0f346055;
    }
    .markdown-content hr {
        border: none;
        border-top: 1px solid #0f3460;
        margin: 24px 0;
    }
    .markdown-content img {
        max-width: 100%;
        border-radius: 4px;
    }
    /* Inline code that isn't in a pre block */
    .markdown-content p > code,
    .markdown-content li > code {
        background: #0f3460;
        padding: 2px 6px;
        border-radius: 3px;
        color: #e94560;
    }
</style>

<h2>{{ title }}</h2>

<div class="markdown-content">
    {{ content|safe }}
</div>
<script>
    if (location.hash) {
        const el = document.querySelector(location.hash);
        if (el) el.scrollIntoView();
    }
</script>
{% endblock %}
