/* Base Variables */
:root {
    --font-primary: 'Open Sans', Arial, sans-serif;
    --font-secondary: 'Oranienbaum', serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-md: 17px;
    --fs-lg: 1.25rem;
    --fs-xl: 2rem;
    --fs-2xl: 3.3rem;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-13: 3.5rem;
    --space-14: 4rem;
    --space-16: 5rem;
    --gap-sm: var(--space-2);
    --gap-md: 10px;
    --gap-lg: 30px;
    --gap-xl: 100px;
    --section-padding: var(--space-10);
    --section-padding-top: var(--space-16);
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-pill: 9999px;
    --container-width: 1240px;
    --logo-size: 1.25rem;
    --logo-footer-size: 60px;
    --icon-size: 64px;
    --nav-padding-y: var(--space-6);
    --nav-padding-x: 10vw;
    --nav-height: calc(var(--nav-padding-y) * 2 + 2em);
    --transition-fast: 0.2s;
    --transition-base: 0.3s;
    --transition-slow: 0.6s;
    --transition-delay-none: 0s;
    --transition-delay-small: 0.05s;
    --transition-delay-medium: 0.1s;
    --transition-delay-large: 0.15s;
    --animation-delay: 10000ms;
    --z-below: -1;
    --z-normal: 0;
    --z-above: 1;
    --z-header: 1000;
    --color-surface: #fff;
    --color-primary: #0f766e;
    --color-primary-focus: #115e59;
    --color-primary-light: #14b8a6;
    --color-secondary: #607D8B;
    --color-text: #333;
    --color-text-contrast: white;
    --color-text-light: #64748b;
    --color-muted: #607D8B;
    --color-bg: #F9FBFD;
    --color-bg-translucent: rgba(249, 251, 253, 0.81);
    --color-white: #fff;
    --color-border: #E4EBF3;
    --color-border-nav: #E4EBF3;
    --color-border-light: #D1D9E2;
    --color-hover: rgba(15, 118, 110, 0.08);
    --color-link-hover: #0d9488;
    --color-shadow: rgba(35, 55, 139, 0.1);
    --btn-bg: var(--color-primary);
    --btn-text: var(--color-white);
    --btn-font: var(--font-primary);
    --btn-radius: var(--radius-md);
    --card-bg: var(--color-white);
    --card-border: var(--color-border-light);
    --testimonial-bg: var(--color-primary);
    --testimonial-text: var(--color-white);
}

/* Dark Theme */
.dark-theme {
    --color-surface: #121212;
    --color-primary: #0d9488;
    --color-primary-focus: #5eead4;
    --color-primary-light: #5eead4;
    --color-secondary: #aabfc9;
    --color-text: #eee;
    --color-text-light: #bbb;
    --color-text-contrast: white;
    --color-muted: #90a4ae;
    --color-bg: #181818;
    --color-bg-translucent: rgba(24, 24, 24, 0.85);
    --color-white: #1e1e1e;
    --color-border: #333;
    --color-border-nav: #333;
    --color-border-light: #444;
    --color-hover: rgba(45, 212, 191, 0.14);
    --color-link-hover: #5eead4;
    --color-shadow: rgba(0, 0, 0, 0.5);
    --btn-bg: var(--color-primary);
    --btn-text: var(--color-white);
    --card-bg: #1f1f1f;
    --card-border: #2a2a2a;
    --testimonial-bg: #134e4a;
    --testimonial-text: #fff;
}
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background-color: var(--color-bg-translucent);
    backdrop-filter: blur(10px);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

/* Drop the header below any full-screen overlay (glightbox, modals) */
.glightbox-open .site-header,
body.modal-open .site-header {
    z-index: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--nav-padding-y) var(--space-8);
    border-bottom: 1px solid var(--color-border-nav);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    margin-right: var(--space-6);
    font-size: 25px;
    color: var(--color-text);
    font-weight: 300;
    text-decoration: none;
}

.nav-logo img,
.nav-logo svg {
    vertical-align: middle;
}

.desktop-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-6);
}

.desktop-menu-part {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    list-style: none;
}

.navbar .divider {
    width: 1px;
    height: 20px;
    background: #929292a1;
    display: block;
}

.nav-link {
    gap: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    font-weight: 500;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: none;
    background: transparent;
    position: relative;
    font-size: 0.9rem;
    cursor: pointer;
    transform: translateY(0);
    white-space: nowrap;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-hover);
    border-radius: var(--radius-md);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link svg {
    width: 20px;
    height: 20px;
}

.nav-item.active .nav-link {
    background-color: rgb(102 142 226 / 12%);
    color: var(--color-primary);
}

.nav-toggle {
    display: none;
    align-items: center;
}

.nav-toggle-checkbox {
    display: none;
}

.nav-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: var(--space-3);
    font-size: var(--fs-xl);
    color: var(--color-text);
    transition: all var(--transition-base);
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) var(--space-8);
    z-index: 100;
    list-style: none;
    margin: 0;
}

.mobile-nav .nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    flex-direction: column;
    gap: 0px;
}

.mobile-nav .nav-item {
    margin: var(--space-1) 0;
    width: 100%;
    list-style: none;
}

.mobile-nav .nav-link {
    width: 100%;
    display: flex;
    padding: var(--space-2) var(--space-4);
    gap: 10px;
    justify-content: flex-start;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.dark-theme .navbar {
    fill: white;
    stroke: white;
}

.dark-theme .nav-link svg {
    fill: var(--color-text);
    stroke: var(--color-text);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.sub-navbar {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-8);
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
}

/* ── Desktop group ─────────────────────────────────────────────────────── */

.nav-group {
    display: flex;
    align-items: center;
}

.nav-group-label {
    font-weight: 600;
}

.nav-group-items {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Mobile submenu ────────────────────────────────────────────────────── */

.has-submenu {
    display: block;
}

nav.sub-navbar .navbar-container {
    justify-content: start;
}
.mobile-group-toggle {
  display: none;
}

.has-submenu > .nav-link {
  justify-content: space-between;
  position: relative;
  width: -webkit-fill-available;
}

.has-submenu .submenu {
  display: none;
  flex-direction: column;
  padding-left: var(--space-4);
}

.mobile-group-toggle:checked + .nav-link + .submenu {
  display: flex;
}

.has-submenu > .nav-link::after {
  content: '▸';
  transition: transform 0.3s;
  padding: 0px 10px;
}

.mobile-group-toggle:checked + .nav-link::after {
  transform: rotate(90deg);
}


/* ── Nav hover highlight ───────────────────────────────────────────────── */

.nav-hover-highlight {
    position: absolute;
    border-radius: var(--radius-md);
    background: var(--color-hover);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease;
    z-index: 0;
}

.nav-hover-highlight.visible {
    opacity: 1;
}

.desktop-menu-part .nav-link {
    z-index: 1;
}

/* ── Desktop dropdown ──────────────────────────────────────────────────── */

.nav-dropdown-wrapper {
    position: relative;
}

/* transparent bridge fills the gap so the mouse can reach the panel */
.nav-dropdown-wrapper::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    height: 12px;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-dropdown-wrapper.is-open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-panel {
    display: block;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    translate: -50% 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 10px);
    padding: var(--space-4) var(--space-3);
    min-width: 260px;
    list-style: none;
    margin: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform-origin: top center;
    z-index: calc(var(--z-header, 100) + 10);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(0.97);
    transition: opacity 0.18s ease, transform 0.2s ease, visibility 0.18s;
}

.nav-dropdown-wrapper:hover .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.nav-dropdown-grid {
    display: grid;
    gap: 0;
}

.nav-dropdown-panel .nav-item {
    width: 100%;
}

.nav-dropdown-panel .nav-item + .nav-item {
    margin-top: var(--space-1);
    padding-top: var(--space-1);
}

.nav-dropdown-panel .dropdown-item {
    width: 100%;
    justify-content: flex-start;
    padding: var(--space-3) var(--space-5);
    font-size: 0.875rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    border-radius: var(--radius-md);
    height: auto;
}

.dropdown-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.3;
}

.dropdown-item-desc {
    font-size: 0.8rem;
    color: var(--color-text-light);
    font-weight: 400;
    line-height: 1.4;
}

/* small arrow caret pointing up from the panel */
.nav-dropdown-panel::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    translate: -50% 0;
    width: 8px;
    height: 8px;
    background: var(--color-white);
    border-left: 1px solid var(--color-border);
    border-top: 1px solid var(--color-border);
    rotate: 45deg;
}

@media (max-width: 1024px) {
    .site-header {
        background-color: var(--color-bg);
    }

    .sub-navbar {
        display: none;
    }

    .desktop-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle-checkbox:checked ~ .mobile-nav,
    .nav-toggle .nav-toggle-checkbox:checked ~ .mobile-nav {
        display: block;
    }

    .navbar:has(.nav-toggle-checkbox:checked) .mobile-nav {
        display: block;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-padding-y: 0.3rem;
    }

    .navbar {
        padding: var(--space-1) var(--space-2);
    }
}


:root {
  --verso-code-color: var(--color-text);
  --verso-code-keyword-color: #0f766e;
  --verso-code-const-color: #9a3412;
  --verso-code-var-color: #1e40af;
  --verso-output-info-color: var(--color-primary);
  --verso-info-indicator-color: var(--color-primary);
}
.dark-theme {
  --verso-code-keyword-color: #5eead4;
  --verso-code-const-color: #fdba74;
  --verso-code-var-color: #93c5fd;
  --verso-code-hover-bg-color: rgba(255, 255, 255, 0.1);
}
.code-gallery-box .hl.lean span.keyword { color: var(--verso-code-keyword-color) !important; }
.code-gallery-box .hl.lean span.const { color: var(--verso-code-const-color) !important; }
.code-gallery-box .hl.lean span.var { color: var(--verso-code-var-color) !important; }
.code-gallery-box .hl.lean span.doc-comment, .code-gallery-box .hl.lean span.comment { color: var(--color-text-light) !important; }

.nav-logo.wordmark { font-weight: 600; font-size: 1.4rem; letter-spacing: 0.01em; color: var(--color-text); text-decoration: none; }
.nav-logo.wordmark:hover { color: var(--color-primary); }
.footer-wordmark { font-weight: 600; font-size: 1.25rem; color: var(--color-text-contrast); text-decoration: none; }
.post-content a { color: var(--color-primary); }
.post-content pre.lean-output { white-space: pre-wrap; overflow-wrap: anywhere; }

main.landing { padding-bottom: var(--space-16); }
.landing-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-12); align-items: center; padding-top: var(--space-16); }
.landing-wordmark { font-size: var(--fs-2xl); font-weight: 600; line-height: 1.1; color: var(--color-text); margin: 0; }
.landing-tagline { font-size: var(--fs-lg); color: var(--color-primary); margin: var(--space-3) 0 0; }
.landing-lede p { font-size: var(--fs-md); color: var(--color-text-light); margin: var(--space-6) 0 0; line-height: 1.6; }
.landing-buttons { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.landing-buttons .button { padding: var(--space-3) var(--space-6); text-decoration: none; }
.landing-hero-figure { margin: 0; justify-self: center; width: 100%; max-width: 420px; }
.landing-hero-figure figcaption { font-size: var(--fs-sm); color: var(--color-text-light); text-align: center; margin-top: var(--space-2); }

.st-diagram { width: 100%; height: auto; display: block; }
.st-big { fill: var(--color-primary); fill-opacity: 0.07; stroke: var(--color-primary); stroke-width: 2; }
.st-small { fill: var(--color-primary); fill-opacity: 0.3; stroke: var(--color-primary); stroke-width: 2; }
.st-cone { stroke: var(--color-text-light); stroke-width: 1.5; stroke-dasharray: 5 5; }
.st-axis { stroke: var(--color-text-light); stroke-width: 1.5; }
.st-arrowhead { fill: var(--color-text-light); }
.st-label { fill: var(--color-text); font-family: var(--font-primary); font-size: 20px; font-weight: 600; }
.st-label-small { font-size: 16px; }
.st-axis-label { fill: var(--color-text-light); font-family: serif; font-style: italic; font-size: 16px; }

.landing-section { padding-top: var(--space-16); }
.landing-section-title { font-size: var(--fs-xl); font-weight: 600; color: var(--color-text); margin: 0 0 var(--space-6); }
.landing-section > p { max-width: 46rem; line-height: 1.7; color: var(--color-text); }
.landing-section a { color: var(--color-primary); }
.landing-section .code-gallery-box { height: auto; }
.landing-section .code-gallery-content { min-height: 0; font-size: 1rem; }
.landing-section .code-gallery-snippet.visible-code { padding: var(--space-6) var(--space-8); }
.code-gallery-run svg { fill: var(--color-primary); }
.landing-section .code-gallery-box { margin-top: var(--space-6); }
.landing-section.centered .landing-section-title { text-align: center; }
.landing-section.centered > p { text-align: center; margin-left: auto; margin-right: auto; max-width: 42rem; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
a.feature-card { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-6);
  padding: var(--space-8); background: var(--card-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  color: var(--color-text); text-decoration: none; transition: border-color var(--transition-base), box-shadow var(--transition-base); }
a.feature-card:hover { border-color: var(--color-primary); box-shadow: 0 6px 18px var(--color-shadow); }
.feature-card-text { margin: 0; line-height: 1.55; color: var(--color-text); }
.feature-card-text strong { font-weight: 700; }
.feature-card-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.feature-card-tags { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.feature-card-tag { background: var(--color-hover); color: var(--color-primary); padding: 2px 10px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; }
.feature-card-more { color: var(--color-primary); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; transition: transform var(--transition-base); }
a.feature-card:hover .feature-card-more { transform: translateX(3px); }

.nav-item.active .nav-link { background-color: rgba(15, 118, 110, 0.12); color: var(--color-primary); }
.dark-theme .nav-item.active .nav-link { background-color: rgba(45, 212, 191, 0.16); color: #5eead4; }
.dark-theme .nav-link:hover { color: #5eead4; }
.dark-theme .feature-card-tag, .dark-theme .feature-card-more { color: #5eead4; }

@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; padding-top: var(--space-10); }
  .feature-grid { grid-template-columns: 1fr; }
}


:root { --site-header-height: 4.5rem; }
header.site-header { display: flex; align-items: center; box-sizing: border-box; height: var(--site-header-height);
  margin: 0; padding: 0; box-shadow: none; background-color: var(--color-bg-translucent);
  border-bottom: 1px solid var(--color-border-nav); font-family: var(--font-primary); font-size: 1rem; line-height: 1.2; }
header.site-header .navbar { flex: 1; min-width: 0; height: 100%; box-sizing: border-box;
  padding: 0 var(--space-8); border-bottom: 0; }
header.site-header .navbar-container.container { max-width: min(var(--container-width), 100vw); padding: 0 var(--space-4);
  margin: 0 auto; width: 100%; box-sizing: border-box; }
header.site-header ul, header.site-header menu, header.site-header li { margin: 0; padding: 0; list-style: none; }
header.site-header button { background: none; border: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }
header.site-header a { text-decoration: none; }
header.site-header .nav-logo.wordmark { font-family: var(--font-primary); font-size: 1.4rem; font-weight: 600; line-height: 1.2;
  letter-spacing: 0.01em; margin: 0 var(--space-6) 0 0; padding: 0; }
header.site-header .nav-link { font-family: var(--font-primary); font-size: 0.9rem; font-weight: 500; line-height: 1.2;
  padding: var(--space-3) var(--space-4); margin: 0; }
header.site-header .nav-link svg { width: 20px; height: 20px; }
header.site-header .nav-toggle-label { font-size: var(--fs-xl); line-height: 1.2; padding: var(--space-3); }
@media (max-width: 1024px) { header.site-header { background-color: var(--color-bg); } }
@media (max-width: 768px) { header.site-header .navbar { padding: 0 var(--space-2); } }


:root {
  --verso-header-height: var(--site-header-height);
  --verso-structure-font-family: var(--font-primary);
  --verso-text-font-family: var(--font-primary);
  --verso-code-font-family: 'Fira Code', monospace;
  --verso-text-color: var(--color-text);
  --verso-structure-color: var(--color-text);
  --verso-selected-color: var(--color-hover);
  --verso-toc-background-color: var(--color-bg);
  --verso-toc-text-color: var(--color-text);
  --verso-toc-border-color: var(--color-border);
  --verso-burger-toc-hidden-color: var(--color-text);
  --verso-burger-toc-hidden-shadow-color: transparent;
  --verso-burger-toc-visible-shadow-color: transparent;
}
.dark-theme {
  --verso-tooltip-color: var(--color-text);
  --verso-tooltip-bg-color: #262626;
  --verso-tooltip-border-color: #555;
  --verso-tooltip-separator-color: #444;
  --verso-tactic-state-color: var(--color-text);
  --verso-tactic-state-bg-color: var(--card-bg);
  --verso-tactic-state-border-color: var(--color-border-light);
}
html { color-scheme: light; }
html.dark-theme { color-scheme: dark; }
body { background-color: var(--color-surface); color: var(--color-text); font-family: var(--font-primary); }

/* The website header in place of the manual header: its layout is `Site.headerCss`; here it is
   only fixed to the top of the page, as the manual genre's layout requires */
header.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 99; }
/* On a phone the table-of-contents button sits in the header, left of the navigation button,
   so that the wordmark keeps its place. Its lines have unequal lengths, like a list of contents,
   to tell it apart from the navigation button */
@media screen and (max-width: 700px) {
  body { --verso-mobile-burger-width: 1.25rem; --verso-mobile-burger-height: 1.1rem; --verso-mobile-burger-line-width: 2px;
    --verso-mobile-burger-line-radius: 1px; }
  #toggle-toc-click { right: calc(var(--space-2) + var(--space-4) + 3.5rem); left: auto; align-items: flex-start; }
  #toggle-toc-click .line2 { width: 70%; }
  #toggle-toc-click .line3 { width: 85%; }
  body:has(#toggle-toc:checked) #toggle-toc-click .line { width: 100%; }
}
/* The manual genre's search box, which its script appends to the header; `searchToToc` moves it
   to the top of the table of contents */
:root { --verso-background-color: var(--color-surface); }
#toc #search-wrapper { position: relative; display: block; box-sizing: border-box; width: 100%; padding: var(--space-4) 0.5rem 0;
  background: transparent; --search-bar-width: 100%; }
#toc #search-wrapper .combobox, #toc #search-wrapper .combobox .group { width: 100%; }
#toc #search-wrapper .combobox .cb_edit { border: 1px solid var(--color-border-light); border-radius: var(--radius-md);
  font-family: var(--font-primary); font-size: var(--fs-sm); padding: 0.4rem 0.75rem; }
#toc #search-wrapper .combobox .group.focus .cb_edit,
#toc #search-wrapper .combobox .group .cb_edit:hover { outline: none; border-color: var(--color-primary); background-color: var(--color-surface); }
#toc #search-wrapper ul[role="listbox"] { border: 1px solid var(--color-border-light); border-radius: var(--radius-md); }

/* Table of contents */
#toc { border-right: 1px solid var(--color-border); }
#toc a { color: var(--color-text); }
#toc a:hover { color: var(--color-primary); }
#toc .split-toc label.toggle-split-toc::before { background-color: currentColor; }
#toc .toc-title { display: block; color: var(--color-text); text-decoration: none; padding: 0 0.5rem; }
#toc .toc-title h1 { font-size: var(--fs-lg); font-weight: 600; margin: var(--space-6) 0 var(--space-2); }

/* Text */
main { color: var(--color-text); }
main h1, main h2, main h3, main h4 { color: var(--color-text); font-weight: 600; }
main a { color: var(--color-primary); }
main a:hover { color: var(--color-link-hover); }
.dark-theme main a { color: #5eead4; }
.katex { font-size: 1.1em; }
.prev-next-buttons a { color: var(--color-text); }
.prev-next-buttons a:hover { color: var(--color-primary); }

/* Long Lean messages (`#check` and `leanOutput` blocks) wrap instead of overflowing, as on the website */
pre.hl.lean.lean-output { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Exercises and solutions (`Tutorial.Meta`) */
.exercise { margin: var(--space-6) 0; padding: var(--space-4) var(--space-6); border-left: 4px solid var(--color-primary);
  background: var(--color-hover); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.exercise > :last-child { margin-bottom: 0; }
.exercise-label { margin: 0 0 var(--space-2); font-weight: 700; color: var(--color-primary); letter-spacing: 0.02em; }
.dark-theme .exercise-label { color: #5eead4; }
details.solution { margin-top: var(--space-3); }
details.solution > summary { cursor: pointer; font-weight: 600; color: var(--color-primary); }
.dark-theme details.solution > summary { color: #5eead4; }
.solution-body { padding-top: var(--space-2); }

/* Figures (`Tutorial.Meta`) */
figure.tutorial-figure { margin: var(--space-8) auto; max-width: 420px; }
figure.tutorial-figure figcaption { font-size: var(--fs-sm); color: var(--color-text-light); text-align: center; margin-top: var(--space-2); }
figure.tutorial-figure figcaption p { margin: 0; }

/* Declaration boxes (`{docstring}`): a field whose type does not fit wraps, with a hanging indent,
   instead of being cut off at the right edge of the box */
.namedocs .subdocs pre.name-and-type { white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 2em; text-indent: -2em; }
