/* WasmPascal tutorials — shared styles for the tutorial series pages.
   Loaded alongside /styles.css. Mirrors the visual language used by the
   card / chip / prev-next patterns elsewhere on the site. */

/* Top breadcrumb line on every lesson page */
.tutorial-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    align-items: baseline;
    justify-content: space-between;
    margin: 0.25rem 0 1.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.tutorial-crumbs a {
    color: var(--color-secondary);
    text-decoration: none;
}

.tutorial-crumbs a:hover {
    text-decoration: underline;
}

/* Lead paragraph on the tutorials index */
main.tutorial .tut-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    text-align: center;
    max-width: 46rem;
    margin: 0 auto 1.5rem;
}

/* The "lesson from the in-browser tutorial" source note */
.lesson-note {
    border-left: 3px solid var(--color-secondary);
    background: #f9f9f9;
    border-radius: 0 4px 4px 0;
    padding: 0.75rem 1.15rem;
    margin: 0 0 1.75rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

html[data-theme="dark"] .lesson-note {
    background: #181825;
}

.lesson-note p {
    margin: 0;
}

/* "Try it" prompts pulled from the lessons */
main.tutorial p.try-it {
    border-left: 3px solid var(--color-primary);
    background: #f0f7f4;
    border-radius: 0 4px 4px 0;
    padding: 0.85rem 1.25rem;
    margin: 1.75rem 0;
    font-size: 0.95rem;
}

html[data-theme="dark"] main.tutorial p.try-it {
    background: #15221d;
    border-left-color: var(--color-secondary);
}

main.tutorial p.try-it em {
    font-style: normal;
}

/* Previous / all tutorials / next */
.tutorial-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin: 2.5rem 0 1rem;
}

.tutorial-nav .spacer {
    flex: 1;
}

.tutorial-nav a {
    border: 1px solid var(--color-secondary);
    border-radius: 3px;
    padding: 6px 14px;
    text-decoration: none;
    color: var(--color-secondary);
    font-size: 0.95rem;
}

.tutorial-nav a:hover {
    background: var(--color-secondary);
    color: #ffffff;
    text-decoration: none;
}

.tutorial-nav a.index-link {
    border-radius: 20px;
}

/* Lesson list on the tutorials index */
.tutorial-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.tutorial-list li {
    border-left: 3px solid var(--color-secondary);
    background: #f9f9f9;
    border-radius: 0 4px 4px 0;
    padding: 12px 16px;
    margin-bottom: 10px;
}

html[data-theme="dark"] .tutorial-list li {
    background: #181825;
}

.tutorial-list .n {
    display: inline-block;
    min-width: 2.4em;
    font-weight: 700;
    color: var(--color-secondary);
}

.tutorial-list a {
    text-decoration: none;
    font-weight: 600;
    color: var(--color-primary);
}

html[data-theme="dark"] .tutorial-list a {
    color: #cdd6f4;
}

.tutorial-list a:hover {
    text-decoration: underline;
    color: var(--color-secondary);
}

.tutorial-list .blurb {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 3px;
}

/* Call-to-action buttons */
.tut-cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 1.75rem 0;
}

.tut-cta {
    display: inline-block;
    border-radius: 4px;
    padding: 10px 18px;
    text-decoration: none;
    font-weight: 600;
}

.tut-cta.primary {
    background: var(--color-secondary);
    color: #ffffff !important;
}

.tut-cta.primary:hover {
    filter: brightness(1.08);
    text-decoration: none;
}

.tut-cta.secondary {
    border: 1px solid var(--color-secondary);
    color: var(--color-secondary);
}

.tut-cta.secondary:hover {
    background: var(--color-secondary);
    color: #ffffff;
    text-decoration: none;
}
