/**
 * DeepSeek Cowork Blog - Markdown Typography Styles
 * Dark theme + Glassmorphism design system
 */

/* ===== Article Content Container ===== */
.prose {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1rem;
}

/* ===== Heading Styles ===== */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: white;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.prose h1 {
    font-size: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5em;
}

.prose h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.4em;
}

.prose h3 {
    font-size: 1.25rem;
}

.prose h4 {
    font-size: 1.125rem;
}

.prose h5,
.prose h6 {
    font-size: 1rem;
}

/* First heading doesn't need top margin */
.prose > h1:first-child,
.prose > h2:first-child,
.prose > h3:first-child {
    margin-top: 0;
}

/* ===== Paragraphs & Text ===== */
.prose p {
    margin-bottom: 1.25em;
}

.prose strong {
    color: white;
    font-weight: 600;
}

.prose em {
    color: rgba(255, 255, 255, 0.9);
}

.prose a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.prose a:hover {
    color: white;
    text-decoration-color: rgba(255, 255, 255, 0.6);
}

/* ===== List Styles ===== */
.prose ul,
.prose ol {
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5em;
    color: rgba(255, 255, 255, 0.8);
}

.prose li::marker {
    color: rgba(255, 255, 255, 0.4);
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* ===== Blockquotes ===== */
.prose blockquote {
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    padding-left: 1em;
    margin: 1.5em 0;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    padding: 1em 1em 1em 1.5em;
    border-radius: 0 8px 8px 0;
}

.prose blockquote p:last-child {
    margin-bottom: 0;
}

/* ===== Code Styles ===== */

/* Inline code */
.prose code {
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875em;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.9);
}

/* Code blocks */
.prose pre {
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1em 1.25em;
    margin: 1.5em 0;
    overflow-x: auto;
}

.prose pre code {
    background: transparent;
    border: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

/* Code block scrollbar */
.prose pre::-webkit-scrollbar {
    height: 6px;
}

.prose pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.prose pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.prose pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== Horizontal Rule ===== */
.prose hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2em 0;
}

/* ===== Images ===== */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.prose img + em {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: -1em;
    margin-bottom: 1.5em;
}

/* ===== Tables ===== */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.875rem;
}

.prose thead {
    background: rgba(255, 255, 255, 0.05);
}

.prose th {
    text-align: left;
    padding: 0.75em 1em;
    font-weight: 600;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.prose td {
    padding: 0.75em 1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
}

.prose tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Responsive tables */
@media (max-width: 640px) {
    .prose table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ===== Task Lists ===== */
.prose ul.contains-task-list {
    list-style: none;
    padding-left: 0;
}

.prose li.task-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
}

.prose input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.1em;
    height: 1.1em;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 0.25em;
    cursor: pointer;
    flex-shrink: 0;
}

.prose input[type="checkbox"]:checked {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.prose input[type="checkbox"]:checked::after {
    content: '✓';
    display: block;
    text-align: center;
    font-size: 0.75em;
    line-height: 1.1em;
    color: white;
}

/* ===== Footnotes ===== */
.prose .footnotes {
    margin-top: 3em;
    padding-top: 1.5em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.prose .footnotes h2 {
    font-size: 1rem;
}

/* ===== Keyboard Keys ===== */
.prose kbd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8em;
    padding: 0.15em 0.4em;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===== Abbreviations ===== */
.prose abbr {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: help;
}

/* ===== Strikethrough & Highlight ===== */
.prose del {
    color: rgba(255, 255, 255, 0.5);
}

.prose mark {
    background: rgba(255, 255, 0, 0.2);
    color: white;
    padding: 0.1em 0.2em;
    border-radius: 2px;
}

/* ===== Details/Collapsible ===== */
.prose details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1em;
    margin: 1.5em 0;
}

.prose summary {
    cursor: pointer;
    font-weight: 500;
    color: white;
}

.prose details[open] summary {
    margin-bottom: 1em;
    padding-bottom: 0.75em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Line Clamp (for list page summary) ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Author Avatar ===== */
.post-card img,
#post-header img {
    object-fit: cover;
}

/* ===== Highlight.js Theme Override ===== */
.hljs {
    background: transparent !important;
}
