


* {
    box-sizing: border-box;
}

body {
    font-size: 17px;
    font-variant-ligatures: none;
    font-family: 'Lato Medium';
    color: var(--text-color);
    background: var(--body-bg);
}

input, select, textarea, button{font-family:inherit;}

a {
   color: var(--link-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato Medium';
}

body { line-height: 1.5; }
nav { line-height: normal; }

:root {
    --header-height: 3em;
    --fragment-offset: calc(var(--header-height) + 1em);
    --content-width: 55vw;

    --header-bg: #f8f8f8;
    --body-bg: white;
    --code-bg: #f3f3f3;
    --text-color: black;
    --link-color: hsl(210, 100%, 30%);

    --implicit-arg-text-color: var(--text-color);

    --def-color: #92dce5;
    --def-color-hsl-angle: 187;
    --theorem-color: #8fe388;
    --theorem-color-hsl-angle: 115;
    --axiom-and-constant-color: #f44708;
    --axiom-and-constant-color-hsl-angle: 16;
    --structure-and-inductive-color: #f0a202;
    --structure-and-inductive-color-hsl-angle: 40;
    --starting-percentage: 100;

    --hamburger-bg-color: #eee;
    --hamburger-active-color: white;
    --hamburger-border-color: #ccc;

    --tags-border-color: #555;

    --fragment-offset: calc(var(--header-height) + 1em);
    --content-width: 55vw;
}
/* automatic dark theme if no javascript */
@media (prefers-color-scheme: dark) {
    :root {
        --header-bg: #111010;
        --body-bg: #171717;
        --code-bg: #363333;
        --text-color: #eee;
        --link-color: #58a6ff;

        --implicit-arg-text-color: var(--text-color);

        --def-color: #1F497F;
        --def-color-hsl-angle: 214;
        --theorem-color: #134E2D;
        --theorem-color-hsl-angle: 146;
        --axiom-and-constant-color: #6B1B1A;
        --axiom-and-constant-color-hsl-angle: 1;
        --structure-and-inductive-color: #73461C;
        --structure-and-inductive-color-hsl-angle: 29;
        --starting-percentage: 30;

        --hamburger-bg-color: #2d2c2c;
        --hamburger-active-color: black;
        --hamburger-border-color: #717171;

        --tags-border-color: #AAA;
    }
}

[data-theme="light"] {
    color-scheme: light;

    --header-height: 3em;
    --fragment-offset: calc(var(--header-height) + 1em);
    --content-width: 55vw;

    --header-bg: #f8f8f8;
    --body-bg: white;
    --code-bg: #f3f3f3;
    --text-color: black;
    --link-color: hsl(210, 100%, 30%);

    --implicit-arg-text-color: var(--text-color);

    --def-color: #92dce5;
    --def-color-hsl-angle: 187;
    --theorem-color: #8fe388;
    --theorem-color-hsl-angle: 115;
    --axiom-and-constant-color: #f44708;
    --axiom-and-constant-color-hsl-angle: 16;
    --structure-and-inductive-color: #f0a202;
    --structure-and-inductive-color-hsl-angle: 40;
    --starting-percentage: 100;

    --hamburger-bg-color: #eee;
    --hamburger-active-color: white;
    --hamburger-border-color: #ccc;

    --tags-border-color: #555;

    --fragment-offset: calc(var(--header-height) + 1em);
    --content-width: 55vw;
}

[data-theme="dark"] {
    color-scheme: dark;

    --header-bg: #111010;
    --body-bg: #171717;
    --code-bg: #363333;
    --text-color: #eee;
    --link-color: #58a6ff;

    --implicit-arg-text-color: var(--text-color);

    --def-color: #1F497F;
    --def-color-hsl-angle: 214;
    --theorem-color: #134E2D;
    --theorem-color-hsl-angle: 146;
    --axiom-and-constant-color: #6B1B1A;
    --axiom-and-constant-color-hsl-angle: 1;
    --structure-and-inductive-color: #73461C;
    --structure-and-inductive-color-hsl-angle: 29;
    --starting-percentage: 30;

    --hamburger-bg-color: #2d2c2c;
    --hamburger-active-color: black;
    --hamburger-border-color: #717171;

    --tags-border-color: #AAA;
}

@supports (width: min(10px, 5vw)) {
    :root {
        --content-width: clamp(20em, 55vw, 60em);
    }
}

#nav_toggle {
    display: none;
}
label[for="nav_toggle"] {
    display: none;
}

header {
    height: var(--header-height);
    float: left;
    position: fixed;
    width: 100vw;
    max-width: 100%;
    left: 0;
    right: 0;
    top: 0;
    --header-side-padding: 1em;
    padding: 0 var(--header-side-padding);
    background: var(--header-bg);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media screen and (max-width: 1000px) {
    :root {
        --content-width: 100vw;
    }

    .internal_nav {
        display: none;
    }

    body .nav {
        width: 100vw;
        max-width: 100vw;
        margin-left: 1em;
        z-index: 1;
    }

    body main {
        width: unset;
        max-width: unset;
        margin-left: unset;
        margin-right: unset;
    }
    body .decl > div {
        overflow-x: unset;
    }

    #nav_toggle:not(:checked) ~ .nav {
        display: none;
    }
    #nav_toggle:checked ~ main {
        visibility: hidden;
    }

    label[for="nav_toggle"]::before {
        content: '≡';
    }
    label[for="nav_toggle"] {
        display: inline-block;
        margin-right: 1em;
        border: 1px solid var(--hamburger-border-color);
        padding: 0.5ex 1ex;
        cursor: pointer;
        background: var(--hamburger-bg-color);
    }
    #nav_toggle:checked ~ * label[for="nav_toggle"] {
        background: var(--hamburger-active-color);
    }

    body header h1 {
        font-size: 100%;
    }

    header {
        --header-side-padding: 1ex;
    }
}
@media screen and (max-width: 700px) {
    header h1 span { display: none; }
    :root { --header-side-padding: 1ex; }
    #search_form button { display: none; }
    #search_form input { width: 100%; }
    header #autocomplete_results {
        left: 1ex;
        right: 1ex;
        width: inherit;
    }
    body header > * { margin: 0; }
}

header > * {
    display: inline-block;
    padding: 0;
    margin: 0;
    vertical-align: middle;
}

header h1 {
    font-weight: normal;
    font-size: 1.5em;
}

header .header_filename {
    font-size: 17px;
    color: gray;
    text-align: center;
    line-height: 95%;
}

/* inserted by nav.js */
#autocomplete_results {
    position: absolute;
    top: var(--header-height);
    right: calc(var(--header-side-padding));
    width: calc(20em + 4em);
    z-index: 1;
    background: var(--header-bg);
    border: 1px solid #aaa;
    border-top: none;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-height));
}

#autocomplete_results:empty {
    display: none;
}

#autocomplete_results[state="loading"]:empty {
    display: block;
    cursor: progress;
}
#autocomplete_results[state="loading"]:empty::before {
    display: block;
    content: ' 🐙 🐙 🐙 🐙 🐙 🐙 🐙 🐙 🐙 🐙 🐙 🐙 🐙 🐙 🐙 ';
    padding: 1ex;
    animation: marquee 10s linear infinite;
}
@keyframes marquee {
    0% { transform: translate(100%, 0); }
    100% { transform: translate(-100%, 0); }
}

#autocomplete_results[state="done"]:empty {
    display: block;
    text-align: center;
    padding: 1ex;
}
#autocomplete_results[state="done"]:empty::before {
    content: '(no results)';
    font-style: italic;
}

#autocomplete_results a {
    display: block;
    color: inherit;
    padding: 1ex;
    border-left: 0.5ex solid transparent;
    padding-left: 0.5ex;
    cursor: pointer;
}

#autocomplete_results .selected .result_link a {
    background: var(--body-bg);
    border-color: var(--structure-and-inductive-color);
}


#search_results {
    width: 100%;
}
#search_results[state="done"]:empty::before {
    content: '(no results)';
    font-style: italic;
}

#search_results .result_link, #search_results .result_doc {
    border-bottom: 1px solid rgba(0, 0, 0, 0.8);
}

.search_result_block {
    width: 100%;
    content-visibility: auto;
    contain-intrinsic-size: auto 75em;
}

.search_result_block_inner {
    display: table;
    width: 100%;
}

.search_result {
    display: table-row;
}

.result_link, .result_doc {
    display: table-cell;
    overflow: hidden;
    word-break: break-word;
}

main, nav {
    margin-top: calc(var(--header-height) + 1em);
}

/* extra space for scrolling things to the top */
main {
    margin-bottom: 90vh;
}

main {
    max-width: var(--content-width);
    /* center it: */
    margin-left: auto;
    margin-right: auto;
}

nav {
    float: left;
    height: calc(100vh - var(--header-height) - 1em);
    position: fixed;
    top: 0;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

nav:hover {
    scrollbar-color: gray transparent;
}

nav {
    --column-available-space: calc((100vw - var(--content-width) - 5em)/2);
    --column-width: calc(var(--column-available-space) - 1ex);
    --dist-to-edge: 1ex;
    width: var(--content-width);
    max-width: var(--column-width);
}
@supports (width: min(10px, 5vw)) {
    .nav { --desired-column-width: 20em; }
    .internal_nav { --desired-column-width: 30em; }
    nav {
        --column-available-space: calc(max(0px, (100vw - var(--content-width) - 5em)/2));
        --column-width: calc(clamp(0px, var(--column-available-space) - 1ex, var(--desired-column-width)));
        --dist-to-edge: calc(max(1ex, var(--column-available-space) - var(--column-width)));
    }
}

.nav { left: var(--dist-to-edge); }
.internal_nav { right: var(--dist-to-edge); }

.internal_nav .nav_link, .taclink {
    /* indent everything but first line by 2ex */
    text-indent: -2ex; padding-left: 2ex;
}

.navframe {
    height: 100%;
    width: 100%;
}

.navframe .nav {
    position: absolute;
    left: 0;
    margin-left: 0;
}

.internal_nav .imports {
    margin-bottom: 1rem;
}

.tagfilter-div {
    margin-bottom: 1em;
}
.tagfilter-div > summary {
    margin-bottom: 1ex;
}

/* top-level modules in left navbar */
.nav .module_list > details {
    margin-top: 1ex;
}

.nav details > * {
    padding-left: 2ex;
}

.nav summary {
    cursor: pointer;
    padding-left: 0;
}

.nav summary::marker {
    font-size: 85%;
}

.nav .nav_file {
    display: inline-block;
}

.nav h3 {
    margin-block-end: 4px;
}

/* People use way too long declaration names. */
.internal_nav, .decl_name {
    overflow-wrap: break-word;
}

/* Add a linebreak after a declaration name. */
.decl_name::after {
    content: "\A";
    white-space: pre;
}

.nav_link {
    overflow-wrap: break-word;
}

.navframe {
    --header-height: 0;
}

#settings {
    margin-top: 5em;
}
#settings h3 {
    font-size: inherit;
}

#color-theme-switcher {
    display: flex;
    justify-content: space-between;
    padding: 0 2ex;
    flex-flow: row wrap;
}

/* custom radio buttons for dark/light switch */
#color-theme-switcher input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-block;
    box-sizing: content-box;
    height: 1em;
    width: 1em;
    background-clip: content-box;
    padding: 2px;
    border: 2px solid transparent;
    margin-bottom: -4px;
    border-radius: 50%;
}
#color-theme-dark { background-color: #444; }
#color-theme-light { background-color: #ccc; }
#color-theme-system {
    background-image: linear-gradient(60deg, #444, #444 50%, #CCC 50%, #CCC);
}
#color-theme-switcher input:checked {
    border-color: var(--text-color);
}

.decl > div, .mod_doc {
    padding-left: 8px;
    padding-right: 8px;
}

.decl {
    margin-top: 20px;
    margin-bottom: 20px;
}

.decl > div {
    /* sometimes declarations arguments are way too long
       and would continue into the right column,
       so put a scroll bar there: */
    overflow-x: auto;
}

/* Make `#id` links appear below header. */
.decl, h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
    scroll-margin-top: var(--fragment-offset);
}
/* don't need as much vertical space for these
inline elements */
a[id], li[id] {
    scroll-margin-top: var(--header-height);
}

/* HACK: Safari doesn't support scroll-margin-top for
fragment links (yet?)
https://caniuse.com/mdn-css_properties_scroll-margin-top
https://bugs.webkit.org/show_bug.cgi?id=189265
*/
@supports not (scroll-margin-top: var(--fragment-offset)) {
    .decl::before, h1[id]::before, h2[id]::before, h3[id]::before,
    h4[id]::before, h5[id]::before, h6[id]::before,
    a[id]::before, li[id]::before {
        content: "";
        display: block;
        height:      var(--fragment-offset);
        margin-top:  calc(-1 * var(--fragment-offset));
        box-sizing: inherit;
        visibility: hidden;
        width: 1px;
    }
}


/* hide # after markdown headings except on hover */
.markdown-heading:not(:hover) > .hover-link {
    visibility: hidden;
}

main h2, main h3, main h4, main h5, main h6 {
    margin-top: 1rem;
    margin-bottom: -0.4rem;
}
.decl + .mod_doc > h2,
        .decl + .mod_doc > h3,
        .decl + .mod_doc > h4,
        .decl + .mod_doc > h5,
        .decl + .mod_doc > h6 {
    margin-top: 4rem;
}

.def, .instance {
    border-left: 10px solid var(--text-color);
    border-top: 2px solid var(--text-color);
}

.theorem {
    border-left: 10px solid var(--theorem-color);
    border-top: 2px solid var(--theorem-color);
}

.axiom, .opaque {
    border-left: 10px solid var(--axiom-and-constant-color);
    border-top: 2px solid var(--axiom-and-constant-color);
}

.structure, .inductive, .class {
    border-left: 10px solid var(--structure-and-inductive-color);
    border-top: 2px solid var(--structure-and-inductive-color);
}

.fn {
    display: inline-block;
    /* border: 1px dashed red; */
    text-indent: -1ex;
    padding-left: 1ex;
    white-space: pre-wrap;
    vertical-align: top;
}

.fn { --fn: 1; }
.fn .fn { --fn: 2; }
.fn .fn .fn { --fn: 3; }
.fn .fn .fn .fn { --fn: 4; }
.fn .fn .fn .fn .fn { --fn: 5; }
.fn .fn .fn .fn .fn .fn { --fn: 6; }
.fn .fn .fn .fn .fn .fn .fn { --fn: 7; }
.fn .fn .fn .fn .fn .fn .fn .fn { --fn: 8; }
.fn {
    transition: background-color 100ms ease-in-out;
}

.def .fn:hover, .instance .fn:hover {
    background-color: hsla(var(--def-color-hsl-angle), 61%, calc(var(--starting-percentage) - 5%*var(--fn)));
    box-shadow: 0 0 0 1px hsla(var(--def-color-hsl-angle), 61%, calc(var(--starting-percentage) - 5%*(var(--fn) + 1)));
    border-radius: 5px;
}
.theorem .fn:hover {
    background-color: hsla(var(--theorem-color-hsl-angle), 62%, calc(var(--starting-percentage) - 5%*var(--fn)));
    box-shadow: 0 0 0 1px hsla(var(--theorem-color-hsl-angle), 62%, calc(var(--starting-percentage) - 5%*(var(--fn) + 1)));
    border-radius: 5px;
}
.axiom .fn:hover, .opaque .fn:hover {
    background-color: hsla(var(--axiom-and-constant-color-hsl-angle), 94%, calc(var(--starting-percentage) - 5%*var(--fn)));
    box-shadow: 0 0 0 1px hsla(var(--axiom-and-constant-color-hsl-angle), 94%, calc(var(--starting-percentage) - 5%*(var(--fn) + 1)));
    border-radius: 5px;
}
.structure .fn:hover, .inductive .fn:hover, .class .fn:hover {
    background-color: hsla(var(--structure-and-inductive-color-hsl-angle), 98%, calc(var(--starting-percentage) - 5%*var(--fn)));
    box-shadow: 0 0 0 1px hsla(var(--structure-and-inductive-color-hsl-angle), 98%, calc(var(--starting-percentage) - 5%*(var(--fn) + 1)));
    border-radius: 5px;
}

.decl_args, .decl_type .decl_parent {
    font-weight: normal;
}

.implicits, .impl_arg {
    color: var(--text-color);
    white-space: normal;
}

.decl_kind, .decl_name, .decl_extends {
    font-weight: bold;
}

/* break long declaration names at periods where possible */
.break_within {
    word-break: break-all;
}

.break_within .name {
    word-break: normal;
}

.decl_header {
    /* indent everything but first line twice as much as decl_type */
    text-indent: -8ex; padding-left: 8ex;
}

.decl_type {
    margin-top: 2px;
    margin-left: 4ex; /* extra indentation */
}

.decl.sorried .decl_name {
    text-decoration: underline wavy #cca733;
}

.decl .sorry_msg > strong {
    color: #a90000;
}

.imports li, code, .decl_header, .attributes, .structure_field_info,
        .constructor, .instances li, .instances-for-list li, .equation, .structure_ext_ctor {
    font-size: 92%;
    font-family: 'JuliaMono', monospace;
}

pre {
    white-space: break-spaces;
}

code, pre { background: var(--code-bg); }
code, pre { border-radius: 5px; }
code { padding: 1px 3px; }
pre { padding: 1ex; }
pre code { padding: 0 0; }

#howabout code { background: inherit; }
#howabout li { margin-bottom: 0.5ex; }

.structure_fields, .constructors {
    display: block;
    padding-inline-start: 0;
    margin-top: 1ex;
    text-indent: -2ex; padding-left: 2ex;
}

.structure_field {
    display: block;
    margin-left: 2ex;
}

.inductive_ctor_doc  {
    text-indent: 0;
    margin-left: 2ex;
    font-family: 'Lato Medium';
    font-size: 17px;
}

.structure_field_doc {
    text-indent: 0;
    font-family: 'Lato Medium';
    font-size: 17px;
}

.structure_ext_fields {
    display: block;
    padding-inline-start: 0;
    margin-top: 1ex;
    text-indent: -2ex; padding-left: 2ex;
}

.structure_ext_fields .structure_field {
    margin-left: -1ex !important;
}

.structure_ext_ctor {
    display: block;
    text-indent: -3ex;
}

.constructor {
    display: block;
}
.constructor:before {
    content: '| ';
    color: gray;
}

/** Don't show underline on types, to prevent the ≤ vs < confusion. **/
a:link, a:visited, a:active {
    color:var(--link-color);
    text-decoration: none;
}

/** Show it on hover though. **/
a:hover {
    text-decoration: underline;
}

.impl_arg {
    font-style: italic;
    transition: opacity 300ms ease-in;
}

.decl_header:not(:hover) .impl_arg,
        .constructor:not(:hover) .impl_arg,
        .structure_field_info:not(:hover) .impl_arg {
    opacity: 30%;
    transition: opacity 1000ms ease-out;
}

.inherited_field {
    transition: opacity 300ms ease-in;
}

.structure_fields:not(:hover) .inherited_field {
    opacity: 30%;
    transition: opacity 1000ms ease-out;
}

.gh_link {
    float: right;
    margin-left: 10px;
}

.ink_link {
    float: right;
    margin-left: 20px;
}


.docfile h2, .note h2 {
    margin-block-start: 3px;
    margin-block-end: 0px;
}

.docfile h2 a {
    color: var(--text-color);
}

.tags {
    margin-bottom: 1ex;
}

.tags ul {
    display: inline;
    padding: 0;
}

.tags li {
    border: 1px solid var(--tags-border-color);
    border-radius: 4px;
    list-style-type: none;
    padding: 1px 3px;
    margin-left: 1ex;
    display: inline-block;
}

/* used by nav.js */
.hide { display: none; }

.tactic, .note {
    border-top: 3px solid #0479c7;
    padding-top: 2em;
    margin-top: 2em;
    margin-bottom: 2em;
}

/* MindFormal: the way back on every page, the front page, the back links (scripts/one-mind/lean-pages.mjs) */
header h1 a.mf-home { color: inherit; text-decoration: none; font-weight: bold; }
header h1 .mf-book a { color: inherit; }
header h1 .mf-book::before { content: "·"; margin: 0 0.5em; }
.mf-in-book { margin: 0.35em 0 0.15em; font-size: 90%; }
.mf-foot { margin: 3em 0 2em; padding-top: 1em; border-top: 1px solid var(--hamburger-border-color); font-size: 90%; }
.mf-front h1 { margin-top: 0.5em; }
.mf-front .mf-version { margin-top: -0.5em; }
.mf-front .mf-links { font-size: 95%; }
.mf-front h2 { margin-top: 1.8em; }
.mf-item { margin: 1.2em 0 1.6em; padding-left: 0.9em; border-left: 3px solid var(--theorem-color); }
.mf-item h3 { margin: 0 0 0.2em; }
.mf-item .mf-sub { margin: 0 0 0.5em; font-size: 95%; }
.mf-item dl { margin: 0; }
.mf-item dt { font-weight: bold; margin-top: 0.5em; }
.mf-item dd { margin: 0.15em 0 0 0; overflow-wrap: anywhere; }
.mf-front code { overflow-wrap: anywhere; }
.mf-in-book { clear: none; }
@media screen and (max-width: 700px) {
  header h1 { flex: none; }
  header h2.header_filename { flex: 1 1 0; min-width: 0; margin: 0 0.6em; font-size: 75%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  header #search_form { flex: 0 1 32%; }
}
.mf-front table { border-collapse: collapse; margin: 1em 0; }
.mf-front th, .mf-front td { border: 1px solid var(--hamburger-border-color); padding: 0.4em 0.6em; vertical-align: top; text-align: left; }
.mf-front thead th { background: var(--code-bg); }
.mf-front pre { white-space: pre; overflow-x: auto; background: var(--code-bg); padding: 0.6em 0.8em; }
.mf-front li { margin: 0.4em 0; }

/* The site's fonts (Spectral, Recursive; SIL Open Font License 1.1, in fonts/) */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/spectral-cyrillic-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/spectral-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/spectral-vietnamese-400-normal.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/spectral-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/spectral-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/spectral-cyrillic-ext-400-italic.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/spectral-cyrillic-400-italic.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/spectral-vietnamese-400-italic.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/spectral-latin-ext-400-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/spectral-latin-400-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/spectral-cyrillic-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/spectral-cyrillic-600-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/spectral-vietnamese-600-normal.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/spectral-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/spectral-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/spectral-cyrillic-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/spectral-cyrillic-700-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/spectral-vietnamese-700-normal.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/spectral-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/spectral-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Recursive Variable';
  font-style: oblique 0deg 15deg;
  font-display: swap;
  font-weight: 300 1000;
  src: url(fonts/recursive-cyrillic-ext-full-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Recursive Variable';
  font-style: oblique 0deg 15deg;
  font-display: swap;
  font-weight: 300 1000;
  src: url(fonts/recursive-vietnamese-full-normal.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: 'Recursive Variable';
  font-style: oblique 0deg 15deg;
  font-display: swap;
  font-weight: 300 1000;
  src: url(fonts/recursive-latin-ext-full-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Recursive Variable';
  font-style: oblique 0deg 15deg;
  font-display: swap;
  font-weight: 300 1000;
  src: url(fonts/recursive-latin-full-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ===== MindFormal in the design of anooprmenon.com (his yes, 29 Nov 2026: "restyle and match the main site") =====
   The site's tokens (src/styles/tokens.css) and type: Spectral to read, Recursive for the chrome, Recursive Mono for
   the code (Lean's symbols outside its Latin set fall back to the system's monospace). Dark first, as on the site;
   the light option kept (doc-gen4's switch sets the same data-theme). doc-gen4's layout stays as Lean readers know
   it; only its variables, type and surfaces are set here. Appended to doc-gen4's style.css by lean-pages.mjs. */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --mf-canvas: oklch(0.12 0 0);
  --mf-surface: oklch(0.16 0 0);
  --mf-raised: oklch(0.20 0 0);
  --mf-card: oklch(0.14 0.005 60);
  --mf-text: oklch(0.92 0.01 80);
  --mf-text-2: oklch(0.70 0.01 80);
  --mf-muted: oklch(0.58 0.01 80);
  --mf-border-subtle: oklch(0.25 0 0);
  --mf-border: oklch(0.30 0 0);
  --mf-accent: oklch(0.72 0.15 70);
  --mf-accent-hover: oklch(0.80 0.17 68);
  --mf-accent-subtle: oklch(0.20 0.03 70);
  --mf-theorem: oklch(0.68 0.14 140);
  --mf-def: oklch(0.60 0.16 250);
  --mf-axiom: oklch(0.70 0.14 30);
  --mf-structure: oklch(0.65 0.18 180);
  --starting-percentage: 30;
}
:root[data-theme="light"] {
  color-scheme: light;
  --mf-canvas: oklch(0.99 0 0);
  --mf-surface: oklch(0.97 0.005 80);
  --mf-raised: oklch(0.95 0.005 80);
  --mf-card: oklch(0.975 0.004 80);
  --mf-text: oklch(0.20 0.01 80);
  --mf-text-2: oklch(0.42 0.01 80);
  --mf-muted: oklch(0.45 0.01 80);
  --mf-border-subtle: oklch(0.88 0.005 80);
  --mf-border: oklch(0.80 0.008 80);
  --mf-accent: oklch(0.52 0.16 70);
  --mf-accent-hover: oklch(0.45 0.18 68);
  --mf-accent-subtle: oklch(0.95 0.04 70);
  --mf-theorem: oklch(0.48 0.14 140);
  --mf-def: oklch(0.45 0.16 250);
  --mf-axiom: oklch(0.55 0.14 30);
  --mf-structure: oklch(0.48 0.16 180);
  --starting-percentage: 100;
}
:root {
  --mf-read: "Spectral", Georgia, "Times New Roman", serif;
  --mf-ui: "Recursive Variable", "Recursive", system-ui, sans-serif;
  --mf-mono: "Recursive Variable", "Recursive", ui-monospace, "SFMono-Regular", monospace;
  --header-height: 3.5rem;
  --fragment-offset: calc(var(--header-height) + 1em);
  --header-bg: var(--mf-canvas);
  --body-bg: var(--mf-canvas);
  --code-bg: var(--mf-surface);
  --text-color: var(--mf-text);
  --link-color: var(--mf-accent);
  --implicit-arg-text-color: var(--mf-text-2);
  --def-color: var(--mf-def);
  --def-color-hsl-angle: 215;
  --theorem-color: var(--mf-theorem);
  --theorem-color-hsl-angle: 125;
  --axiom-and-constant-color: var(--mf-axiom);
  --axiom-and-constant-color-hsl-angle: 12;
  --structure-and-inductive-color: var(--mf-structure);
  --structure-and-inductive-color-hsl-angle: 180;
  --hamburger-bg-color: var(--mf-surface);
  --hamburger-active-color: var(--mf-raised);
  --hamburger-border-color: var(--mf-border);
  --tags-border-color: var(--mf-border);
}

/* ---- Reading type ---- */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--mf-read);
  font-size: 18px;
  line-height: 1.65;
  font-variant-ligatures: common-ligatures;
  color: var(--text-color);
  background: var(--body-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
input, select, textarea, button { font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--mf-read); color: var(--mf-text); }
main h1 { font-size: clamp(1.875rem, 1.41rem + 1.99vw, 2.75rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere; }
main h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
main h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.3; }
main h4, main h5, main h6 { font-size: 1.15rem; font-weight: 600; line-height: 1.3; }

a:link, a:visited, a:active { color: var(--mf-accent); text-decoration: none; }
a:hover { color: var(--mf-accent-hover); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--mf-accent); outline-offset: 2px; border-radius: 2px; }

/* ---- Code ---- */
code, pre, .imports li, .decl_header, .attributes, .structure_field_info, .constructor, .instances li,
.instances-for-list li, .equation, .structure_ext_ctor, .header_filename, .internal_nav {
  font-family: var(--mf-mono);
  font-variation-settings: "MONO" 1, "CASL" 0;
  font-variant-ligatures: none;
}
code, .imports li, .decl_header, .attributes, .structure_field_info, .constructor, .instances li,
.instances-for-list li, .equation, .structure_ext_ctor { font-size: 0.84em; line-height: 1.6; }
code { background: var(--code-bg); border-radius: 4px; padding: 0.1em 0.35em; }
pre { font-size: 0.84em; line-height: 1.6; background: var(--code-bg); border: 1px solid var(--mf-border-subtle); border-radius: 6px; padding: 0.9rem 1rem; }
pre code { font-size: inherit; background: none; padding: 0; border-radius: 0; }
.decl_header code, .decl_type code { background: none; padding: 0; font-size: inherit; }

/* ---- The header: the site's bar ---- */
header {
  background: color-mix(in oklab, var(--mf-canvas) 85%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mf-border-subtle);
  font-family: var(--mf-ui);
  font-variation-settings: "MONO" 0, "CASL" 0;
  gap: 1rem;
}
header h1 { font-family: var(--mf-ui); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
header h1 a.mf-home, header h1 a.mf-home:hover { color: var(--mf-text); font-weight: 600; text-decoration: none; }
header h1 .mf-ver { color: var(--mf-muted); font-weight: 400; }
header h1 .mf-book { font-weight: 400; font-size: 0.95rem; }
header h1 .mf-book::before { color: var(--mf-muted); margin: 0 0.65em; }
header h1 .mf-book a:link, header h1 .mf-book a:visited { color: var(--mf-text-2); }
header h1 .mf-book a:hover { color: var(--mf-accent); text-decoration: none; }
header .header_filename { font-size: 0.8rem; font-weight: 400; color: var(--mf-muted); }
#search_form input {
  width: 14rem; background: var(--mf-surface); color: var(--mf-text);
  border: 1px solid var(--mf-border); border-radius: 6px; padding: 0.4rem 0.7rem; font-size: 0.875rem;
}
#search_form input:focus-visible { outline: none; border-color: var(--mf-accent); }
#search_form button {
  background: transparent; color: var(--mf-accent); border: 1px solid var(--mf-accent); border-radius: 6px;
  padding: 0.4rem 0.9rem; font-size: 0.875rem; font-weight: 600; cursor: pointer;
}
#search_form button:hover { background: var(--mf-accent-subtle); }
#autocomplete_results { background: var(--mf-raised); border-color: var(--mf-border); border-radius: 0 0 6px 6px; font-family: var(--mf-mono); font-variation-settings: "MONO" 1, "CASL" 0; font-size: 0.85rem; }
label[for="nav_toggle"] { color: var(--mf-text); border-radius: 6px; font-family: var(--mf-ui); line-height: 1.2; }

/* ---- The navigation (left) and the page's own list (right) ---- */
.nav { font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.875rem; line-height: 1.55; }
.nav h3, #settings h3 {
  font-family: var(--mf-ui); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mf-muted); margin: 1.6rem 0 0.45rem;
}
.nav a:link, .nav a:visited { color: var(--mf-text-2); }
.nav a:hover { color: var(--mf-accent); text-decoration: none; }
.nav summary { color: var(--mf-text); }
.nav summary::marker { color: var(--mf-muted); }
.internal_nav { font-size: 0.78rem; line-height: 1.5; }
.internal_nav a:link, .internal_nav a:visited { color: var(--mf-text-2); }
.internal_nav a:hover { color: var(--mf-accent); text-decoration: none; }
.internal_nav > p a:link, .internal_nav > p a:visited, .internal_nav summary {
  font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.85rem;
}
.internal_nav > p a:link, .internal_nav > p a:visited { color: var(--mf-accent); }
.internal_nav summary { color: var(--mf-text); cursor: pointer; }
#color-theme-switcher { font-family: var(--mf-ui); font-size: 0.85rem; color: var(--mf-text-2); justify-content: flex-start; gap: 0.4rem 1.25rem; padding: 0; }
#color-theme-switcher input:checked { border-color: var(--mf-accent); }

/* ---- Declarations: a quiet card, a thin rule in the kind's color ---- */
.decl { margin: 1.75rem 0; }
.def, .instance { --mf-kind: var(--mf-def); }
.theorem { --mf-kind: var(--mf-theorem); }
.axiom, .opaque { --mf-kind: var(--mf-axiom); }
.structure, .inductive, .class { --mf-kind: var(--mf-structure); }
.def, .instance, .theorem, .axiom, .opaque, .structure, .inductive, .class {
  border: 1px solid var(--mf-border-subtle);
  border-left: 3px solid var(--mf-kind);
  border-radius: 0 6px 6px 0;
  background: var(--mf-card);
}
.decl > div { padding: 0.85rem 1.1rem 0.7rem; }
.decl_kind { color: var(--mf-kind); font-weight: 600; }
.decl_name { font-weight: 600; }
.gh_link { font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.8rem; }
.mf-in-book {
  font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.82rem; line-height: 1.5;
  color: var(--mf-text-2); margin: 0 0 0.55rem;
}
.mf-in-book + .decl_header { margin-top: 0.3rem; }
.mod_doc { line-height: 1.65; }
.tactic, .note { border-color: var(--mf-border-subtle); }

/* ---- Search ---- */
#search_page_query {
  margin-left: 0.5rem; width: min(24rem, 100%); background: var(--mf-surface); color: var(--mf-text);
  border: 1px solid var(--mf-border); border-radius: 6px; padding: 0.4rem 0.7rem; font-size: 0.9rem;
  font-family: var(--mf-mono); font-variation-settings: "MONO" 1, "CASL" 0;
}
#search_page_query:focus-visible { outline: none; border-color: var(--mf-accent); }
main label[for="search_page_query"], #kinds { font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.9rem; color: var(--mf-text-2); }
#kinds { margin: 0.9rem 0 1.2rem; line-height: 1.9; }
input[type="checkbox"] { accent-color: var(--mf-accent); }
#search_results .result_link, #autocomplete_results .result_link { font-family: var(--mf-mono); font-variation-settings: "MONO" 1, "CASL" 0; font-size: 0.85rem; }
#search_results .result_doc { font-size: 0.95rem; color: var(--mf-text-2); }

/* ---- The foot of every page ---- */
.mf-foot {
  font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.85rem; line-height: 1.6;
  color: var(--mf-text-2); border-top: 1px solid var(--mf-border-subtle);
}

/* ---- The front page and the main statements ---- */
.mf-front h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin: 2.5rem 0 1rem; }
.mf-front .mf-version { font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.9rem; color: var(--mf-text-2); margin: 0 0 0.6rem; }
.mf-front .mf-links { font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.9rem; line-height: 1.8; }
.mf-front h2 { margin: 3rem 0 0.9rem; padding-top: 2rem; border-top: 1px solid var(--mf-border-subtle); }
.mf-front h3 { margin-top: 1.8rem; }
.mf-item { border-left: 2px solid var(--mf-theorem); padding: 0.2rem 0 0.2rem 1.1rem; margin: 1.6rem 0; }
.mf-item h3 { font-size: 1.2rem; margin: 0 0 0.3rem; }
.mf-item .mf-sub { font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.85rem; color: var(--mf-text-2); }
.mf-item dt {
  font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--mf-muted); margin-top: 0.9rem;
}
.mf-item dd { margin: 0.2rem 0 0; }
.mf-front table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.mf-front th, .mf-front td { border: 0; border-bottom: 1px solid var(--mf-border-subtle); padding: 0.6rem 0.9rem 0.6rem 0; vertical-align: top; text-align: left; }
.mf-front thead th { background: none; font-family: var(--mf-ui); font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.8rem; font-weight: 600; color: var(--mf-text-2); border-bottom-color: var(--mf-border); }
.mf-front pre { white-space: pre; overflow-x: auto; }

/* ---- The root's own pages (the redirect and the 404) ---- */
.mf-plain { max-width: 40rem; margin: 5rem auto; padding: 0 1rem; }

/* ---- Phones ---- */
@media screen and (max-width: 1000px) {
  main { padding: 0 1rem; }
  header { --header-side-padding: 1rem; }
}
main a, .mf-front td { overflow-wrap: anywhere; }
@media screen and (max-width: 700px) {
  main { padding: 0 0.5rem; }
  header .header_filename { display: none; }
  header #search_form { flex: 1 1 auto; max-width: 15rem; margin-left: auto; }
  #search_form input { width: 100%; }
  .decl > div { padding: 0.7rem 0.75rem 0.6rem; }
}
