
/* Brand colors */
:root {
    --pn-primary: #068FB9;
    --pn-secondary: #0D6782;
    --pn-accent: #00bbe3;
    --pn-text: #2b363e;
    --pn-bg: #f7f7f7;
}

/* Navigation styles */
.nav-unit-header {
    font-weight: 700;
    color: var(--pn-text);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.nav-chapter {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--pn-primary);
    text-decoration: none;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.nav-chapter:hover {
    background-color: var(--pn-lighter-gray);
}

.nav-chapter-unavailable {
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.nav-chapter-active {
    background-color: var(--pn-lighter-gray);
    font-weight: 600;
}

/* Chapter navigation buttons */
.chapter-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.btn-prev, .btn-next {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--pn-primary);
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-prev:hover, .btn-next:hover {
    background-color: var(--pn-secondary);
}

/* Prose styles for markdown content */
.prose {
    color: var(--pn-text);
}

.prose h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pn-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--pn-text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--pn-text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--pn-text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.prose ul, .prose ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.prose a {
    color: var(--pn-primary);
    text-decoration: underline;
}

.prose a:hover {
    color: var(--pn-secondary);
}

.prose code {
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.prose pre {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

.prose blockquote {
    border-left: 4px solid var(--pn-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: #6b7280;
    font-style: italic;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.prose th, .prose td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.prose th {
    background-color: #f9fafb;
    font-weight: 600;
    color: var(--pn-text);
}

.prose tr:hover {
    background-color: #f9fafb;
}

/* Hide CHONK sections */
[id^="chonk"] {
    display: none;
}

/* Learner's Manual input boxes */
.prose table:has([colspan="2"]) {
    background-color: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1.5rem 0;
}

/* Figure/Asset styling */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin: 1.5rem auto;
    display: block;
}

.prose img + p em,
.prose p em:only-child {
    display: block;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

/* Asset embed container */
.prose p:has(img) {
    text-align: center;
}

/* Figure caption styling */
.prose em:first-child:last-child {
    display: block;
    text-align: center;
}

/* Deep dive specific styles */
.deep-dive-content {
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100px);
    padding-top: 1rem;
}

.deep-dive-content h2:first-of-type {
    color: var(--pn-primary);
    border-bottom: 3px solid var(--pn-accent);
}

.deep-dive-content blockquote {
    background-color: #f0f9ff;
    border-left-color: var(--pn-accent);
    padding: 1rem 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Reading time and prerequisite styling */
.deep-dive-content p:has(strong:contains("Reading time")),
.deep-dive-content p:has(strong:contains("Prerequisite")) {
    color: #6b7280;
    font-size: 0.9rem;
}
