/* ---- core/license.css ---- */
/*
  PaperMod v7
  License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE
  Copyright (c) 2020 nanxiaobei and adityatelange
  Copyright (c) 2021-2024 adityatelange
*/

/* ---- fonts: Computer Modern Serif (cm-unicode, SIL OFL), self-hosted ---- */
@font-face {
    font-family: 'Computer Modern Serif';
    src: url('/assets/fonts/cmunrm.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Computer Modern Serif';
    src: url('/assets/fonts/cmunbx.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Computer Modern Serif';
    src: url('/assets/fonts/cmunti.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Computer Modern Serif';
    src: url('/assets/fonts/cmunbi.woff') format('woff');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}

/* ---- core/theme-vars.css ---- */
:root {
    --gap: 24px;
    --content-gap: 20px;
    --nav-width: 1024px;
    --main-width: 640px;
    /* Type scale: a major second (×1.125) on an 18px base, 17px on phones.
       Small steps suit a text-first site; sizes below come from these. */
    --step--3: 12.6px;
    --step--2: 14.2px;
    --step--1: 16px;
    --step-0: 18px;
    --step-1: 20.25px;
    --step-2: 22.8px;
    --step-3: 25.6px;
    --step-4: 28.8px;
    --step-5: 32.4px;
    --step-6: 36.5px;
    --step-7: 41px;
    --header-height: 44px;
    --footer-height: 70px;
    --radius: 8px;
    --theme: rgb(251, 247, 236);
    --entry: rgb(253, 250, 242);
    --primary: rgb(30, 30, 30);
    --secondary: rgb(108, 108, 108);
    --tertiary: rgb(236, 230, 216);
    --gray: rgb(165, 165, 165);
    --content: rgb(30, 30, 30);
    --code-block-bg: rgb(28, 29, 33);
    --code-bg: rgb(244, 239, 226);
    --border: rgb(233, 226, 211);
    /* Palette: the pan flag, muted to sit on cream. The -ink shades are
       dark enough to use for text. */
    --pink: #d27e9f;
    --pink-ink: #a4517a;
    --yellow: #dcb553;
    --yellow-ink: #8a6914;
    --blue: #7193cf;
    --blue-ink: #44659f;
    --darkcolor: var(--blue);
    --darkercolor: var(--pink-ink);
    --lightcolor: #e5dcc8;
    --semibold: 500;
    --homesize: 16px;
    --textsize: 18px;
    --h1size: 25px;
    --entrysize: 15px;
    --headersize: 16px;
    --footersize: 13px;
    --lineheight: 1.45;
    --lineclamp: 8;
    --marginleft: 26px;
}

.dark {
    --theme: rgb(29, 30, 32);
    --entry: rgb(46, 46, 51);
    --primary: rgb(218, 218, 219);
    --secondary: rgb(155, 156, 157);
    --tertiary: rgb(65, 66, 68);
    --content: rgb(196, 196, 197);
    --code-block-bg: rgb(46, 46, 51);
    --code-bg: rgb(55, 56, 62);
    --border: rgb(51, 51, 51);
}

.list {
    background: var(--code-bg);
}

.dark.list {
    background: var(--theme);
}

::selection {
    background: rgba(220, 181, 83, 0.35);
}

/* ---- core/reset.css ---- */
*,
::after,
::before {
    box-sizing: border-box;
}

html {
    -webkit-tap-highlight-color: transparent;
    overflow-y: scroll;
}

a,
button,
body,
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary);
}

body {
    font-family: 'Computer Modern Serif', serif;
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; */
    font-size: 18px;
    line-height: 1.6;
    word-break: break-word;
    color: var(--text);
    background: var(--theme);
}

article,
aside,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
table {
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 0;
    margin-bottom: 0;
}

ul {
    padding: 0;
}

a {
    text-decoration: none;
}

body,
figure,
ul {
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    overflow-x: auto;
    word-break: keep-all;
}

button,
input,
textarea {
    padding: 0;
    font: inherit;
    background: 0 0;
    border: 0;
}

input,
textarea {
    outline: 0;
}

button,
input[type=button],
input[type=submit] {
    cursor: pointer;
}

input:-webkit-autofill,
textarea:-webkit-autofill {
    box-shadow: 0 0 0 50px var(--theme) inset;
}

img {
    display: block;
    max-width: 100%;
}

/* ---- common/404.css ---- */
.not-found {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80%;
    font-size: 160px;
    font-weight: 700;
}

/* ---- common/archive.css ---- */
.archive-posts {
    width: 100%;
    font-size: 16px;
}

.archive-year {
    margin-top: 40px;
}

.archive-year-header {
    font-size: var(--h1size);
}

.archive-year:not(:last-of-type) {
    border-bottom: 2px solid var(--border);
}

.archive-month {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
}

.archive-month-header {
    margin: var(--homesize) 0;
    width: 200px;
    font-weight: var(--semibold);
    font-size: var(--homesize);
}

.archive-month:not(:last-of-type) {
    border-bottom: 2px solid var(--border);
}

.archive-entry {
    position: relative;
    padding: 5px;
    margin: 10px 0;
}

.archive-entry-title {
    margin: 5px 0;
    font-weight: normal;
    font-size: var(--homesize);
}

.archive-count,
.archive-meta {
    color: var(--secondary);
    font-size: 14px;
}

/* ---- common/footer.css ---- */
.footer,
.top-link {
    font-size: var(--footersize);
    color: var(--secondary);
}

.footer {
    margin: auto;
    padding: calc((var(--footer-height) - var(--gap)) / 2) var(--gap);
    text-align: center;
    line-height: 20px;
    background: var(--code-bg);
}

.footer span {
    margin-inline-start: 1px;
    margin-inline-end: 1px;
}

.footer span:last-child {
    white-space: nowrap;
}

.footer a {
    color: var(--secondary);
}

@media (hover: hover) {
    .footer a:hover {
        border-bottom: 2px solid var(--darkcolor);
    }
}

.top-link {
    visibility: hidden;
    position: fixed;
    bottom: 60px;
    right: 30px;
    z-index: 99;
    background: var(--tertiary);
    width: 42px;
    height: 42px;
    padding: 12px;
    border-radius: 64px;
    transition: visibility 0.5s, opacity 0.8s linear;
}

.top-link,
.top-link svg {
    filter: drop-shadow(0px 0px 0px var(--theme));
}

@media (hover: hover) {
    .footer a:hover,
    .top-link:hover {
        color: var(--secondary);
    }
}

.top-link:focus,
#theme-toggle:focus {
    outline: 0;
}

/* ---- header ---- */
/* No bar, no icon: Home on the left, the sections on the right, on the page's column. */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    max-width: calc(var(--main-width) + var(--gap) * 2);
    margin: 0 auto;
    padding: 28px var(--gap) 0;
    font-size: var(--headersize);
}

.site-header nav {
    display: flex;
    gap: 22px;
}

.site-header nav a {
    position: relative;
    color: var(--secondary);
    transition: color 0.2s ease;
}

/* A short pink rule draws in under the link on hover and marks the current page. */
.site-header nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    border-radius: 1px;
    background: var(--pink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.site-header nav a[aria-current="page"] {
    color: var(--primary);
}

@media (hover: hover) {
    .site-header nav a:hover {
        color: var(--primary);
    }
}

.site-header nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

@media (hover: hover) {
    .site-header nav a:hover::after {
        transform: scaleX(1);
    }
}

/* ---- common/main.css ---- */
.main {
    position: relative;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    max-width: calc(var(--main-width) + var(--gap) * 2);
    margin: auto;
    padding: var(--gap);
}

.page-header h1 {
    font-size: var(--h1size);
}

.pagination {
    display: flex;
}

.pagination a {
    color: var(--theme);
    font-size: 13px;
    line-height: 36px;
    background: var(--primary);
    border-radius: calc(36px / 2);
    padding: 0 16px;
}

.pagination .next {
    margin-inline-start: auto;
}

.social-icons a {
    display: inline-flex;
    padding: 10px;
}

.social-icons a svg {
    height: 26px;
    width: 26px;
}

@media (hover: hover) {
    .social-icons a:hover {
        color: var(--darkcolor);
    }
}

code {
    /* font-family: 'Computer Modern Typewriter', monospace; */
    direction: ltr;
}

code {
    text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

div.highlight,
pre {
    position: relative;
}

.copy-code {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(78, 78, 78, 0.8);
    border-radius: var(--radius);
    padding: 0 5px;
    font-size: 14px;
    user-select: none;
}

@media (hover: hover) {
    div.highlight:hover .copy-code,
    pre:hover .copy-code {
        display: block;
    }
}

/* ---- common/post-entry.css ---- */
.first-entry {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    margin: var(--gap) 0 calc(var(--gap) * 2) 0;
}

.first-entry .entry-header {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
}

.first-entry .entry-header h1 {
    font-size: 34px;
    line-height: 1.3;
}

.first-entry .entry-content {
    margin: 14px 0;
    font-size: 16px;
    -webkit-line-clamp: 8;
}

.first-entry .entry-footer {
    font-size: 14px;
}

.home-info .entry-content {
    -webkit-line-clamp: unset;
}

.post-entry {
    position: relative;
    margin-bottom: var(--gap);
    padding: var(--gap);
    background: var(--entry);
    border-radius: var(--radius);
    transition: transform 0.1s;
    border: 2px solid var(--border);
}

@media (hover: hover) {
    .post-entry:hover {
        border: 2px solid var(--darkcolor);
    }
}

.tag-entry .entry-cover {
    display: none;
}

.entry-header h2 {
    font-size: 20px;
    line-height: var(--lineheight);
}

.entry-content {
    margin: 10px 10px;
    color: var(--secondary);
    font-size: var(--entrysize);
    line-height: var(--lineheight);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
}

.entry-footer {
    color: var(--content);
    font-size: var(--entrysize);
}

.entry-link {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

.entry-hint {
    color: var(--secondary);
}

.entry-hint-parent {
    display: flex;
    justify-content: space-between;
}

.entry-cover {
    font-size: var(--entrysize);
    margin-bottom: var(--gap);
    text-align: center;
}

.entry-cover img {
    border-radius: var(--radius);
    pointer-events: none;
    width: 100%;
    height: auto;
}

.entry-cover a {
    color: var(--secondary);
    box-shadow: 0 1px 0 var(--primary);
}

/* ---- common/post-single.css ---- */
.page-header,
.post-header {
    margin: 24px auto var(--content-gap) auto;
}

.post-title {
    margin-bottom: 20px;
    font-size: var(--step-6);
}

.post-description {
    margin-top: 10px;
    margin-bottom: 5px;
}

.post-meta,
.breadcrumbs {
    color: var(--secondary);
    font-size: 15px;
}

.post-meta .i18n_list li {
    display: inline-flex;
    list-style: none;
    margin: auto 3px;
    box-shadow: 0 1px 0 var(--secondary);
}

.post-content {
    color: var(--content);
    line-height: var(--lineheight);
    font-size: var(--textsize);
}

.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 24px 0 16px;
}

.post-content h1 {
    margin: 40px auto 32px;
    font-size: 40px;
}

.post-content h2 {
    margin: 32px auto 24px;
    font-size: 24px;
}

.post-content h3 {
    font-size: 19px;
}

.post-content h4 {
    font-size: 15px;
    /* font-weight: var(--semibold); */
    /* text-transform: uppercase; */
    /* color: var(--gray); */
}

.post-content h5 {
    font-size: 14px;
    font-weight: var(--semibold);
    text-transform: uppercase;
    color: var(--gray);
}

.post-content h6 {
    font-size: var(--footersize);
    color: var(--secondary);
}

.post-content a,
.post-meta a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--darkcolor);
    text-underline-offset: 1px;
    color: currentColor;
}

@media (hover: hover) {
    .toc a:hover {
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-decoration-color: var(--darkcolor);
        text-underline-offset: 1px;
        color: currentColor;
    }
}

@media (hover: hover) {
    a:hover {
        color: var(--darkercolor);
    }
}

.post-content a code {
    margin: auto 0;
    border-radius: 0;
    box-shadow: 0 -1px 0 var(--primary) inset;
}

.post-content del {
    text-decoration: line-through;
}

.post-content dl,
.post-content ol,
.post-content p,
.post-content figure,
.post-content ul {
    margin-bottom: var(--content-gap);
}

.post-content ol,
.post-content ul {
    padding-inline-start: 20px;
    margin-left: var(--marginleft);
}

.post-content li {
    margin-top: 5px;
}

.post-content li::marker {
    color: var(--primary);
}

.post-content li p {
    margin-bottom: 0;
}

.post-content dl {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.post-content dt {
    width: 25%;
    font-weight: 700;
}

.post-content dd {
    width: 75%;
    margin-inline-start: 0;
    padding-inline-start: 10px;
}

.post-content dd ~ dd,
.post-content dt ~ dt {
    margin-top: 10px;
}

.post-content table {
    margin-bottom: var(--content-gap);
}

.post-content table th,
.post-content table:not(.highlighttable, .highlight table, .gist .highlight) td {
    min-width: 80px;
    padding: 8px 5px;
    line-height: var(--lineheight);
    border-bottom: 1px solid var(--border);
}

.post-content table th {
    text-align: start;
    font-size: 14px;
    font-weight: var(--semibold);
    text-transform: uppercase;
    color: var(--gray);
    border-bottom: 2px solid var(--tertiary);
}

.post-content table:not(.highlighttable) td code:only-child {
    margin: auto 0;
}

.post-content .highlight table {
    border-radius: var(--radius);
}

.post-content .highlight:not(table) {
    margin: 10px auto;
    background: var(--code-block-bg) !important;
    border-radius: var(--radius);
    direction: ltr;
}

.post-content li > .highlight {
    margin-inline-end: 0;
}

.post-content ul pre {
    margin-inline-start: calc(var(--gap) * -2);
}

.post-content .highlight pre {
    margin: 0;
}

.post-content .highlighttable {
    table-layout: fixed;
}

.post-content .highlighttable td:first-child {
    width: 40px;
}

.post-content .highlighttable td .linenodiv {
    padding-inline-end: 0 !important;
}

.post-content .highlighttable td .highlight,
.post-content .highlighttable td .linenodiv pre {
    margin-bottom: 0;
}

.post-content code {
    margin: auto 4px;
    padding: 4px 6px;
    font-size: 0.78em;
    line-height: var(--lineheight);
    background: var(--code-bg);
    border-radius: 2px;
}

.post-content pre code {
    display: grid;
    margin: auto 0;
    padding: 10px;
    color: var(--secondary);
    border-radius: var(--radius);
    overflow-x: auto;
    word-break: break-all;
}

.post-content blockquote {
    margin: 20px 0;
    padding: 0 14px;
    border-inline-start: 4px solid var(--tertiary);
}

.post-content hr {
    margin: 30px 0;
    height: 2px;
    background: var(--tertiary);
    border: 0;
}

.post-content iframe {
    max-width: 100%;
}

.post-content img {
    border-radius: 4px;
    margin: 1rem 0;
}

/* Diagrams have white backgrounds; let the warm page show through them. */
body:not(.dark) .post-content img {
    mix-blend-mode: multiply;
}

.post-content img[src*="#center"] {
    margin: 1rem auto;
}

.post-content figure.align-center {
    text-align: center;
}

.post-content figure > figcaption {
    color: var(--primary);
    font-size: 16px;
    font-weight: bold;
    margin: 8px 0 16px;
}

.post-content figure > figcaption > p {
    color: var(--secondary);
    font-size: 14px;
    font-weight: normal;
}

.toc {
    margin: 0 2px 20px 2px;
    border: 1px solid var(--border);
    background: var(--code-bg);
    border-radius: var(--radius);
    padding: 0.4em;
}

.toc li::marker {
    color: var(--primary);
}

.dark .toc {
    background: var(--entry);
}

.toc details summary {
    cursor: zoom-in;
    margin-inline-start: 10px;
    user-select: none;
}

.toc details[open] summary {
    cursor: zoom-out;
}

.toc .details {
    display: inline;
    font-weight: var(--semibold);
    /* text-transform: uppercase; */
    font-size: 15px;
}

.toc .inner {
    margin: 5px 20px 0;
    padding: 0 10px;
    opacity: 0.9;
    font-size: 16px;
}

.toc li ul {
    margin-inline-start: var(--gap);
}

.toc summary:focus {
    outline: 0;
}

.post-footer {
    margin-top: 60px;
}

.post-footer>* {
    margin-bottom: 10px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-tags li {
    display: inline-block;
}

.post-tags a,
.share-buttons,
.paginav {
    border-radius: var(--radius);
    background: var(--code-bg);
}

.post-tags a {
    display: block;
    padding: 0 10px;
    color: var(--secondary);
    font-size: 16px;
    line-height: 32px;
    background: var(--code-bg);
}

@media (hover: hover) {
    .post-tags a:hover {
        background: var(--lightcolor);
    }
}

@media (hover: hover) {
    .paginav a:hover {
        background: var(--lightcolor);
    }
}

.share-buttons {
    padding: 10px;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    gap: 10px;
}

.share-buttons li,
.share-buttons a {
    display: inline-flex;
}

.share-buttons a:not(:last-of-type) {
    margin-inline-end: 12px;
}

@media (hover: hover) {
    h1:hover .anchor,
    h2:hover .anchor,
    h3:hover .anchor,
    h4:hover .anchor,
    h5:hover .anchor,
    h6:hover .anchor {
        display: inline-flex;
        color: var(--darkcolor);
        margin-inline-start: 10px;
        font-weight: 700;
        user-select: none;
        box-shadow: 0 0px 0 var(--darkcolor);
    }
}

.paginav {
    display: flex;
    line-height: var(--lineheight);
    font-size: var(--footersize);
}

.paginav a {
    padding-inline-start: 15px;
    padding-inline-end: 15px;
    border-radius: var(--radius);
    color: var(--secondary);
}

.paginav .title {
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: small;
    color: var(--secondary);
}

.paginav .prev,
.paginav .next {
    width: 50%;
}

.paginav .next {
    margin-inline-start: auto;
    text-align: right;
}

[dir="rtl"] .paginav .next {
    text-align: left;
}

h1>a>svg {
    display: inline;
}

img.in-text {
    display: inline;
    margin: auto;
}

a[href^="#fn:"], a[href^="#fnref:"] {
    box-shadow: 0 0px 0 var(--darkcolor);
}

@media (hover: hover) {
    a[href^="#fn:"]:hover,
    a[href^="#fnref:"]:hover {
        color: var(--darkcolor);
    }
}
/* ---- common/profile-mode.css ---- */
.buttons,
.main .profile {
    display: flex;
    justify-content: left;
}
.main .profile {
    align-items: center;
    min-height: calc(100vh - var(--footer-height) - (var(--gap) * 2));
    font-size: var(--homesize);
    line-height: var(--lineheight);
}

.profile .profile_inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.profile .profile_inner h1 {
    font-size: 40px;
}

.profile img {
    border-radius: 50%;
}

.buttons {
    flex-wrap: wrap;
}

.button {
    background: var(--tertiary);
    border-radius: 3px;
    margin: 8px 16px 8px 0px;
    padding: 6px;
    transition: transform 0.1s;
}

.button-inner {
    padding: 0 8px;
}

@media (hover: hover) {
    .button:hover {
        background: var(--lightcolor);
        transition: background-color 0.2s ease-in-out;
    }
}

.subtitle h1,
.subtitle h2,
.subtitle h3,
.subtitle h4,
.subtitle h5,
.subtitle h6 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--primary);
}

.subtitle p {
    margin: 10px 0;
    line-height: 1.6;
    color: var(--content);
}

.subtitle a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--darkcolor);
    text-underline-offset: 1px;
    color: currentColor;
}

@media (hover: hover) {
    .subtitle a:hover {
        color: var(--darkercolor);
    }
}

/* ---- common/search.css ---- */
#searchbox input {
    padding: 4px 10px;
    width: 100%;
    color: var(--primary);
    border-radius: var(--radius);
    background: var(--entry);
    border: 1px solid var(--border);
}

#searchResults li {
    list-style: none;
    border-radius: var(--radius);
    padding: 10px;
    margin: 10px 0;
    position: relative;
    font-weight: 400;
}

#searchResults {
    margin: 10px 0;
    width: 100%;
}

#searchResults a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    outline: none;
}

#searchResults .focus {
    border: 1px solid var(--darkcolor);
}

/* ---- common/terms.css ---- */
.terms-tags li {
    display: inline-block;
    margin: 10px;
    font-weight: 400;
}

.terms-tags a {
    display: block;
    padding: 3px 10px;
    background: var(--tertiary);
    border-radius: 6px;
    transition: transform 0.1s;
    font-size: var(--homesize);
}

@media (hover: hover) {
    .terms-tags a:hover {
        background: var(--lightcolor);
    }
}

/* ---- includes/chroma-styles.css ---- */
/* Background */
.bg { color: #cad3f5; background-color: #24273a; }
/* PreWrapper */
.chroma { color: #cad3f5; background-color: #24273a; }
/* Other */
.chroma .x {  }
/* Error */
.chroma .err { color: #ed8796 }
/* CodeLine */
.chroma .cl {  }
/* LineLink */
.chroma .lnlinks { outline: none; text-decoration: none; color: inherit }
/* LineTableTD */
.chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */
.chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */
.chroma .hl { background-color: #474733 }
/* LineNumbersTable */
.chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #8087a2 }
/* LineNumbers */
.chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #8087a2 }
/* Line */
.chroma .line { display: flex; }
/* Keyword */
.chroma .k { color: #c6a0f6 }
/* KeywordConstant */
.chroma .kc { color: #f5a97f }
/* KeywordDeclaration */
.chroma .kd { color: #ed8796 }
/* KeywordNamespace */
.chroma .kn { color: #8bd5ca }
/* KeywordPseudo */
.chroma .kp { color: #c6a0f6 }
/* KeywordReserved */
.chroma .kr { color: #c6a0f6 }
/* KeywordType */
.chroma .kt { color: #ed8796 }
/* Name */
.chroma .n {  }
/* NameAttribute */
.chroma .na { color: #8aadf4 }
/* NameBuiltin */
.chroma .nb { color: #91d7e3 }
/* NameBuiltinPseudo */
.chroma .bp { color: #91d7e3 }
/* NameClass */
.chroma .nc { color: #eed49f }
/* NameConstant */
.chroma .no { color: #eed49f }
/* NameDecorator */
.chroma .nd { color: #8aadf4; font-weight: bold }
/* NameEntity */
.chroma .ni { color: #8bd5ca }
/* NameException */
.chroma .ne { color: #f5a97f }
/* NameFunction */
.chroma .nf { color: #8aadf4 }
/* NameFunctionMagic */
.chroma .fm { color: #8aadf4 }
/* NameLabel */
.chroma .nl { color: #91d7e3 }
/* NameNamespace */
.chroma .nn { color: #f5a97f }
/* NameOther */
.chroma .nx {  }
/* NameProperty */
.chroma .py { color: #f5a97f }
/* NameTag */
.chroma .nt { color: #c6a0f6 }
/* NameVariable */
.chroma .nv { color: #f4dbd6 }
/* NameVariableClass */
.chroma .vc { color: #f4dbd6 }
/* NameVariableGlobal */
.chroma .vg { color: #f4dbd6 }
/* NameVariableInstance */
.chroma .vi { color: #f4dbd6 }
/* NameVariableMagic */
.chroma .vm { color: #f4dbd6 }
/* Literal */
.chroma .l {  }
/* LiteralDate */
.chroma .ld {  }
/* LiteralString */
.chroma .s { color: #a6da95 }
/* LiteralStringAffix */
.chroma .sa { color: #ed8796 }
/* LiteralStringBacktick */
.chroma .sb { color: #a6da95 }
/* LiteralStringChar */
.chroma .sc { color: #a6da95 }
/* LiteralStringDelimiter */
.chroma .dl { color: #8aadf4 }
/* LiteralStringDoc */
.chroma .sd { color: #6e738d }
/* LiteralStringDouble */
.chroma .s2 { color: #a6da95 }
/* LiteralStringEscape */
.chroma .se { color: #8aadf4 }
/* LiteralStringHeredoc */
.chroma .sh { color: #6e738d }
/* LiteralStringInterpol */
.chroma .si { color: #a6da95 }
/* LiteralStringOther */
.chroma .sx { color: #a6da95 }
/* LiteralStringRegex */
.chroma .sr { color: #8bd5ca }
/* LiteralStringSingle */
.chroma .s1 { color: #a6da95 }
/* LiteralStringSymbol */
.chroma .ss { color: #a6da95 }
/* LiteralNumber */
.chroma .m { color: #f5a97f }
/* LiteralNumberBin */
.chroma .mb { color: #f5a97f }
/* LiteralNumberFloat */
.chroma .mf { color: #f5a97f }
/* LiteralNumberHex */
.chroma .mh { color: #f5a97f }
/* LiteralNumberInteger */
.chroma .mi { color: #f5a97f }
/* LiteralNumberIntegerLong */
.chroma .il { color: #f5a97f }
/* LiteralNumberOct */
.chroma .mo { color: #f5a97f }
/* Operator */
.chroma .o { color: #91d7e3; font-weight: bold }
/* OperatorWord */
.chroma .ow { color: #91d7e3; font-weight: bold }
/* Punctuation */
.chroma .p {  }
/* Comment */
.chroma .c { color: #6e738d; font-style: italic }
/* CommentHashbang */
.chroma .ch { color: #6e738d; font-style: italic }
/* CommentMultiline */
.chroma .cm { color: #6e738d; font-style: italic }
/* CommentSingle */
.chroma .c1 { color: #6e738d; font-style: italic }
/* CommentSpecial */
.chroma .cs { color: #6e738d; font-style: italic }
/* CommentPreproc */
.chroma .cp { color: #6e738d; font-style: italic }
/* CommentPreprocFile */
.chroma .cpf { color: #6e738d; font-weight: bold; font-style: italic }
/* Generic */
.chroma .g {  }
/* GenericDeleted */
.chroma .gd { color: #ed8796; background-color: #363a4f }
/* GenericEmph */
.chroma .ge { font-style: italic }
/* GenericError */
.chroma .gr { color: #ed8796 }
/* GenericHeading */
.chroma .gh { color: #f5a97f; font-weight: bold }
/* GenericInserted */
.chroma .gi { color: #a6da95; background-color: #363a4f }
/* GenericOutput */
.chroma .go {  }
/* GenericPrompt */
.chroma .gp {  }
/* GenericStrong */
.chroma .gs { font-weight: bold }
/* GenericSubheading */
.chroma .gu { color: #f5a97f; font-weight: bold }
/* GenericTraceback */
.chroma .gt { color: #ed8796 }
/* GenericUnderline */
.chroma .gl { text-decoration: underline }
/* TextWhitespace */
.chroma .w {  }

/* ---- includes/chroma-mod.css ---- */
.chroma {
    background-color: unset !important;
}

.chroma .hl {
    display: flex;
}

.chroma .lnt {
    padding: 0 0 0 12px;
}

.highlight pre.chroma code {
    padding: 8px 0;
}

.highlight pre.chroma .line .cl,
.chroma .ln {
    padding: 0 10px;
}

.chroma .lntd:last-of-type {
    width: 100%;
}

/* ---- core/zmedia.css ---- */
@media screen and (max-width: 768px) {
    /* theme-vars */
    :root {
        --gap: 14px;
    }

    /* profile-mode */
    .profile img {
        transform: scale(0.85);
    }

    /* post-entry */
    .first-entry {
        min-height: 260px;
    }

    /* archive */
    .archive-month {
        flex-direction: column;
    }

    .archive-year {
        margin-top: 20px;
    }

    /* footer */
    .footer {
        padding: calc((var(--footer-height) - var(--gap) - 10px) / 2) var(--gap);
    }
}

/* footer */
@media screen and (max-width: 900px) {
    .list .top-link {
        transform: translateY(-5rem);
    }
}

@media screen and (max-width: 340px) {
    .share-buttons {
        justify-content: unset;
    }
}

@media (prefers-reduced-motion) {
    /* terms; profile-mode; post-single; post-entry; post-entry; search; search */
    .terms-tags a:active,
    .button:active,
    .post-entry:active,
    .top-link,
    #searchResults .focus,
    #searchResults li:active {
        transform: none;
    }
}

/* ---- home ---- */
/* The shared .main is vertically centered by margin:auto; the landing places
   itself instead. */
body.kind-home .main {
    margin: 0 auto;
    min-height: 0;
}

.home {
    /* Sits above true center, where the eye lands first. */
    padding: clamp(48px, 20vh, 220px) 0 48px;
    max-width: var(--main-width);
    margin: 0 auto;
}

.home-intro p {
    max-width: 30em;
}

.home h1 {
    font-size: var(--step-7);
    line-height: 1.2;
    color: var(--primary);
}

.home-intro p {
    margin-top: 14px;
    font-size: var(--textsize);
    line-height: 1.6;
    color: var(--content);
}

.home a,
.page .social-icons + * a {
    color: currentColor;
}

.home-intro p a,
.home-links a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--darkcolor);
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

@media (hover: hover) {
    .home-intro p a:hover,
    .home-links a:hover {
        color: var(--darkercolor);
    }
}

.home-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 22px;
    font-size: var(--homesize);
}

.home-photo {
    display: block;
    border-radius: 50%;
    margin-bottom: 20px;
}

/* Lines settle in one after another on load. */
@media (prefers-reduced-motion: no-preference) {
    .home-intro > * {
        animation: settle 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }
    .home-intro > :nth-child(2) { animation-delay: 0.08s; }
    .home-intro > :nth-child(3) { animation-delay: 0.16s; }
    .home-intro > :nth-child(4) { animation-delay: 0.24s; }
}

@keyframes settle {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ---- standalone pages (/about/) ---- */
.page .page-image {
    border-radius: 50%;
    margin-bottom: 24px;
}

.page .social-icons {
    margin-top: 28px;
}

/* ---- about: timeline ---- */
.timeline {
    position: relative;
    list-style: none;
    margin: 36px 0 40px;
    padding: 0;
}

/* The spine: a thin rule running behind the dots. */
.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: var(--border);
    transform-origin: top;
}

.timeline-entry {
    position: relative;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 4px 20px;
    padding: 0 0 32px 32px;
}

.timeline-entry::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 7px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--dot);
    box-shadow: 0 0 0 4px var(--theme);
}

.timeline-when {
    padding-top: 2px;
    font-size: var(--footersize);
    letter-spacing: 0.04em;
    color: var(--secondary);
    white-space: nowrap;
}

.timeline-what h2 {
    font-size: 18px;
    margin: 0 0 4px;
    color: var(--primary);
}

.post-content .timeline-what p {
    margin: 0;
}

.about-intro {
    margin-bottom: 36px;
    color: var(--content);
    line-height: 1.6;
}

@media (max-width: 560px) {
    .timeline-entry {
        grid-template-columns: 1fr;
    }
}

/* Load-in: the spine draws downward while every dot pops and the text
   settles, all at once. Only applied once JS has opted in (see content/about/index.html). */
.timeline.animate::before {
    animation: draw 1.2s cubic-bezier(0.3, 0.6, 0.2, 1) both;
}

@keyframes draw {
    from { transform: scaleY(0); }
}

.timeline.animate .timeline-entry::before {
    transform: scale(0);
    transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
    transition-delay: 0.1s;
}

.timeline.animate .timeline-entry > * {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: 0.18s;
}

.timeline.animate .timeline-entry.in::before {
    transform: scale(1);
}

.timeline.animate .timeline-entry.in > * {
    opacity: 1;
    transform: none;
}

/* Timeline titles are links: no underline at rest; on hover the header's pink
   rule draws in. */
.post-content .timeline-what h2 a {
    position: relative;
    text-decoration: none;
    color: var(--primary);
}

.post-content .timeline-what h2 a::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 1px;
    background: var(--pink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (hover: hover) {
    .post-content .timeline-what h2 a:hover::before {
        transform: scaleX(1);
    }
}

/* ---- notes index ---- */
/* A quiet typographic index: titles to scan, summaries beneath. No cards. */
body.list:has(.notes-index) {
    background: var(--theme);
}

.notes-index {
    max-width: var(--main-width);
    margin: 0 auto;
    padding: 40px 0 64px;
}

.notes-header {
    margin-bottom: 44px;
}

.notes-header h1 {
    font-size: var(--step-6);
    line-height: 1.2;
    color: var(--primary);
}

.notes-list {
    list-style: none;
    margin: 0;
    padding: 28px 0 0 34px;
    border-top: 1px solid var(--border);
}

/* Title on the left, when and how long on the right, summary beneath. */
.notes-entry {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 24px;
    padding-bottom: 22px;
    transition: opacity 0.3s ease;
}

.notes-title {
    font-size: var(--step-1);
    line-height: 1.4;
    margin: 0;
}

/* Titles standing alone (no summary under them) are set lighter. */
.titles-only .notes-title {
    font-weight: normal;
    font-size: var(--step-0);
}

.notes-title a {
    position: relative;
    display: inline-block;
    color: var(--primary);
}

.notes-title a:focus-visible {
    outline: none;
}

/* The emoji hangs to the left so every title's first letter lines up. */
.notes-emoji {
    position: absolute;
    right: 100%;
    top: 0;
    margin-right: 0.45em;
    font-size: 0.9em;
    line-height: 1.55;
}

/* The signature pink rule, drawn per line so wrapped titles work too. */
.notes-text {
    background: linear-gradient(var(--pink), var(--pink)) no-repeat 0 100% / 0 2px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    padding-bottom: 2px;
    transition: background-size 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.notes-title a:focus-visible .notes-text {
    background-size: 100% 2px;
}

@media (hover: hover) {
    .notes-title a:hover .notes-text {
        background-size: 100% 2px;
    }
}

.notes-meta {
    padding-top: 5px;
    font-size: var(--footersize);
    letter-spacing: 0.04em;
    color: var(--secondary);
    white-space: nowrap;
    text-align: right;
    transition: color 0.2s ease;
}

.notes-summary {
    grid-column: 1 / -1;
    margin-top: 4px;
    max-width: 36em;
    font-size: 16px;
    line-height: 1.55;
    color: var(--secondary);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

@media (max-width: 560px) {
    .notes-index {
        padding-top: 16px;
    }

    .notes-header {
        margin-bottom: 28px;
    }

    .notes-header h1 {
        font-size: var(--step-5);
    }

    .notes-list {
        padding: 22px 0 0;
    }

    .notes-entry {
        grid-template-columns: 1fr;
        padding-bottom: 24px;
    }

    .notes-title {
        font-size: var(--step-1);
    }

    /* No margin to hang into on a phone: the emoji sits inline. */
    .notes-emoji {
        position: static;
        margin-right: 0.1em;
    }

    /* Meta tucks under the summary as a quiet footnote. */
    .notes-meta {
        order: 3;
        padding-top: 4px;
        text-align: left;
    }

    .notes-summary {
        font-size: 15px;
    }
}

/* Load-in: the title settles, then all the entries together. */
@media (prefers-reduced-motion: no-preference) {
    .notes-header,
    .notes-entry {
        /* backwards, not both: once settled, hover dimming owns opacity. */
        animation: settle 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
    }
    .notes-entry {
        animation-delay: 0.1s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notes-entry,
    .notes-text,
    .notes-meta,
    .notes-summary {
        transition: none;
    }
}

/* ---- writing index: subsections ---- */
.notes-index.has-groups .notes-list {
    border-top: 0;
    padding-top: 8px;
}

.notes-index.has-groups .notes-entry {
    padding-bottom: 18px;
}

/* Subsections: a small capitals label over each group of pieces, as on
   the publications page. */
.notes-group + .notes-group {
    margin-top: 28px;
}

.notes-group-title {
    font-size: var(--footersize);
    font-weight: normal;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary);
}

.notes-index.has-groups .notes-group .notes-list {
    padding-top: 14px;
}

/* ---- note page ---- */
/* A single note: title and a quiet line of when and how long, the contents
   behind a hairline, then the text set for long reading. Rules on the note's
   text use :where(.kind-note) so they carry no more weight than the older
   .post-content rules they replace, and a page's own stylesheet still wins. */

/* Header: no breadcrumb (the site header already says where you are). */
.kind-note .post-header {
    margin: 44px 0 30px;
}

.kind-note .post-title {
    position: relative;
    margin: 0 0 14px;
    font-size: var(--step-6);
    line-height: 1.18;
    letter-spacing: -0.005em;
    text-wrap: balance;
}

.post-emoji {
    font-size: 0.86em;
}

/* Where there is margin to spare, the emoji hangs into it, as on the index. */
@media (min-width: 860px) {
    .post-emoji {
        position: absolute;
        right: 100%;
        top: 0.08em;
        margin-right: 0.4em;
    }
}

.kind-note .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.55em;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--secondary);
}

.post-meta-sep {
    color: var(--gray);
}

/* ---- note page: contents ---- */
/* Both placements drop the old grey box. */
.kind-note .toc {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}

/* Above the text: one line between hairlines that opens into the list. */
.kind-note .toc-fold {
    margin-bottom: 40px;
    border-block: 1px solid var(--border);
}

.kind-note .toc-fold summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 13px 0;
    list-style: none;
    cursor: pointer;
    font-size: 15px;
    letter-spacing: 0.04em;
    color: var(--secondary);
    transition: color 0.2s ease;
}

.kind-note .toc-fold summary::-webkit-details-marker {
    display: none;
}

.kind-note .toc-fold details[open] summary {
    color: var(--primary);
}

@media (hover: hover) {
    .kind-note .toc-fold summary:hover {
        color: var(--primary);
    }
}

.kind-note .toc-fold summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

/* A small plus that folds into a minus once open. */
.toc-mark {
    position: relative;
    width: 11px;
    height: 11px;
    margin-right: 2px;
}

.toc-mark::before,
.toc-mark::after {
    content: "";
    position: absolute;
    background: currentColor;
    border-radius: 1px;
}

.toc-mark::before {
    left: 0;
    right: 0;
    top: 5px;
    height: 1px;
}

.toc-mark::after {
    top: 0;
    bottom: 0;
    left: 5px;
    width: 1px;
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.kind-note .toc-fold details[open] .toc-mark::after {
    transform: scaleY(0);
}

/* The list itself, shared by both placements. */
.kind-note .toc-list .katex {
    font-size: 1.05em;
}

.kind-note .toc-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kind-note .toc-list li {
    margin: 0;
}

.kind-note .toc-list a {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* The signature pink rule draws under an entry on hover, line by line. */
.kind-note .toc-list a {
    background: linear-gradient(var(--pink), var(--pink)) no-repeat 0 100% / 0 1.5px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-size 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s ease;
}

.kind-note .toc-list a:focus-visible {
    background-size: 100% 1.5px;
    color: var(--primary);
    outline: none;
}

@media (hover: hover) {
    .kind-note .toc-list a:hover {
        background-size: 100% 1.5px;
        color: var(--primary);
        outline: none;
    }
}

.kind-note .toc-fold .toc-list {
    padding: 0 0 20px;
    font-size: 16px;
    line-height: 1.4;
}

.kind-note .toc-fold .toc-list li {
    margin-top: 7px;
}

.kind-note .toc-fold .toc-list ol ol {
    margin: 4px 0 6px 3px;
    padding-left: 16px;
    border-left: 1px solid var(--border);
    font-size: 15px;
}

.kind-note .toc-fold .toc-list ol ol a {
    color: var(--secondary);
}

@media (hover: hover) {
    .kind-note .toc-fold .toc-list ol ol a:hover {
        color: var(--primary);
    }
}

/* In the margin: a sticky column that follows along (see toc.js). */
.toc-side {
    display: none;
}

.toc-side .toc-label {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--secondary);
}

@media (min-width: 1200px) {
    .kind-note .main {
        max-width: none;
    }

    .kind-note .post-single {
        display: grid;
        grid-template-columns: minmax(0, 1fr) min(var(--main-width), 100%) minmax(0, 1fr);
    }

    .kind-note .post-single > * {
        grid-column: 2;
    }

    .kind-note .post-single > .post-header { grid-row: 1; }
    .kind-note .post-single > .toc-fold { display: none; }
    .kind-note .post-single > .post-content { grid-row: 3; }
    .kind-note .post-single > .post-footer { grid-row: 4; }

    /* :where() keeps this light, so a page that hides .toc still can. */
    :where(.kind-note .post-single) > .toc-side {
        display: block;
    }

    .kind-note .post-single > .toc-side {
        grid-column: 1;
        grid-row: 2 / 5;
        align-self: start;
        justify-self: end;
        position: sticky;
        top: 36px;
        width: min(212px, 100% - 44px);
        margin: 6px 44px 0 0;
    }

    .toc-side .toc-list {
        position: relative;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: none;
        font-size: 14px;
        line-height: 1.35;
    }

    .toc-side .toc-list::-webkit-scrollbar {
        display: none;
    }

    .toc-side .toc-list li {
        margin: 0;
    }

    .toc-side .toc-list a {
        position: relative;
        padding: 4px 0;
        background-position: 0 calc(100% - 3px);
        color: var(--secondary);
    }

    .toc-side .toc-list ol ol {
        padding-left: 12px;
        font-size: 13.5px;
    }

    /* The section you're in: darker, with a short pink rule beside it. */
    .toc-side .toc-list a[aria-current] {
        color: var(--primary);
    }

    .toc-side .toc-list a::before {
        content: "";
        position: absolute;
        right: calc(100% + 10px);
        top: calc(4px + 0.66em);
        width: 10px;
        height: 2px;
        border-radius: 1px;
        background: var(--pink);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
    }

    .toc-side .toc-list a[aria-current]::before {
        transform: scaleX(1);
    }
}

/* The list can hold the rule just outside its left edge. */
.toc-side .toc-list {
    padding-left: 20px;
    margin-left: -20px;
}

/* ---- note page: text ---- */
:where(.kind-note) .post-content {
    line-height: 1.58;
}

:where(.kind-note) .post-content [id] {
    scroll-margin-top: 28px;
}

:where(.kind-note) .post-content h2 {
    margin: 2.1em 0 0.65em;
    font-size: var(--step-3);
    line-height: 1.25;
}

:where(.kind-note) .post-content h3 {
    margin: 1.8em 0 0.5em;
    font-size: var(--step-1);
    line-height: 1.3;
}

:where(.kind-note) .post-content h4 {
    margin: 1.6em 0 0.4em;
    font-size: 17px;
    line-height: 1.35;
}

:where(.kind-note) .post-content h2 + h3,
:where(.kind-note) .post-content h3 + h4 {
    margin-top: 0.9em;
}

:where(.kind-note) .post-content > :first-child {
    margin-top: 0;
}

:where(.kind-note) .post-content ol,
:where(.kind-note) .post-content ul {
    margin-left: 0;
    padding-inline-start: 1.5em;
}

:where(.kind-note) .post-content li {
    margin-top: 0.35em;
    padding-inline-start: 0.2em;
}

:where(.kind-note) .post-content li > ol,
:where(.kind-note) .post-content li > ul {
    margin-bottom: 0.2em;
}

:where(.kind-note) .post-content li::marker {
    color: var(--secondary);
}

:where(.kind-note) .post-content ol > li::marker {
    font-variant-numeric: tabular-nums;
}

:where(.kind-note) .post-content a {
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

@media (hover: hover) {
    :where(.kind-note) .post-content a:hover {
        text-decoration-color: var(--pink);
    }
}

:where(.kind-note) .post-content blockquote {
    margin: 1.7em 0;
    padding: 0.1em 0 0.1em 1.2em;
    border-inline-start: 2px solid var(--pink);
}

:where(.kind-note) .post-content blockquote > :last-child {
    margin-bottom: 0;
}

:where(.kind-note) .post-content hr {
    width: 56px;
    height: 1px;
    margin: 2.6em auto;
    background: var(--gray);
}

:where(.kind-note) .post-content img:not(.in-text) {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.8em auto;
}

/* Side-by-side images keep their row. */
:where(.kind-note) .post-content div[style*="flex"] {
    gap: 16px;
    margin-bottom: var(--content-gap);
}

:where(.kind-note) .post-content div[style*="flex"] img {
    min-width: 0;
    margin: 0;
}

:where(.kind-note) .post-content code {
    margin: 0 1px;
    padding: 2px 5px;
    font-size: 0.8em;
    border-radius: 3px;
}

:where(.kind-note) .post-content .highlight {
    margin: 1.6em 0;
}

:where(.kind-note) .post-content pre code {
    margin: 0;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 4px;
}

/* Copy: a word in the corner, there when you reach for it. */
.kind-note .copy-code {
    display: block;
    top: 8px;
    right: 10px;
    padding: 2px 4px;
    background: none;
    border-radius: 0;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--secondary);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.kind-note .copy-code:focus-visible {
    opacity: 1;
}

@media (hover: hover) {
    .kind-note .highlight:hover .copy-code {
        opacity: 1;
    }
}

@media (hover: hover) {
    .kind-note .copy-code:hover {
        color: var(--primary);
    }
}

@media (hover: none) {
    .kind-note .copy-code {
        opacity: 1;
    }
}

/* Math in the same Computer Modern as the text, at a matching size. */
:where(.kind-note) .post-content .katex {
    font-size: 1.1em;
}

:where(.kind-note) .post-content .katex-display {
    margin: 1.3em 0;
    padding: 0.2em 0;
    overflow-x: auto;
    overflow-y: hidden;
}

:where(.kind-note) .post-content table:not(.lntable) {
    width: 100%;
    margin: 1.6em 0;
    border-collapse: collapse;
    font-size: 16px;
}

:where(.kind-note) .post-content table:not(.lntable) th {
    padding: 8px 12px 8px 0;
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--secondary);
    border-bottom: 1px solid var(--gray);
}

:where(.kind-note) .post-content table:not(.lntable) td {
    padding: 8px 12px 8px 0;
}

/* ---- note page: footer ---- */
.kind-note .post-footer {
    margin-top: 64px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.post-up.top {
    margin-bottom: 14px;
}

.post-up a {
    font-size: var(--step--2);
    letter-spacing: 0.04em;
    color: var(--secondary);
    transition: color 0.2s ease;
}

.post-up-text {
    background: linear-gradient(var(--pink), var(--pink)) no-repeat 0 100% / 0 2px;
    padding-bottom: 3px;
    transition: background-size 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.post-up a:focus-visible {
    color: var(--primary);
}

@media (hover: hover) {
    .post-up a:hover {
        color: var(--primary);
    }
}

.post-up a:focus-visible .post-up-text {
    background-size: 100% 2px;
}

@media (hover: hover) {
    .post-up a:hover .post-up-text {
        background-size: 100% 2px;
    }
}

/* ---- note page: phones ---- */
@media (max-width: 560px) {
    .kind-note .post-header {
        margin: 24px 0 24px;
    }

    .kind-note .post-title {
        font-size: var(--step-5);
        line-height: 1.2;
    }

    .kind-note .toc-fold {
        margin-bottom: 30px;
    }

    :where(.kind-note) .post-content {
        font-size: 17px;
    }

    :where(.kind-note) .post-content h2 {
        font-size: var(--step-3);
    }

    :where(.kind-note) .post-content h3 {
        font-size: var(--step-1);
    }

    :where(.kind-note) .post-content pre code {
        padding: 14px 16px;
        font-size: 13px;
    }
}

/* ---- note page: motion ---- */
/* The header settles, then the contents and the text; the contents list
   eases open. All of it stays still for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
    .kind-note .post-header > *,
    .kind-note .toc,
    .kind-note .post-content {
        animation: settle 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
    }
    .kind-note .post-meta { animation-delay: 0.06s; }
    .kind-note .toc { animation-delay: 0.12s; }
    .kind-note .post-content { animation-delay: 0.16s; }

    .kind-note .toc-fold details[open] .toc-list > ol > li {
        animation: settle 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
        animation-delay: calc(min(var(--i, 0), 14) * 0.025s);
    }

    @supports (interpolate-size: allow-keywords) and selector(::details-content) {
        .kind-note .toc-fold details {
            interpolate-size: allow-keywords;
        }
        .kind-note .toc-fold details::details-content {
            block-size: 0;
            overflow: hidden;
            transition:
            block-size 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
            content-visibility 0.45s allow-discrete;
        }
        .kind-note .toc-fold details[open]::details-content {
            block-size: auto;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .toc-mark::after,
    .kind-note .toc-list a,
    .toc-side .toc-list a::before,
    .kind-note .copy-code,
    .post-up-text {
        transition: none;
    }
}

/* ---- 404 ---- */
.lost {
    max-width: var(--main-width);
    margin: 0 auto;
    padding: clamp(48px, 18vh, 200px) 0 64px;
}

.lost-code {
    font-size: var(--footersize);
    letter-spacing: 0.14em;
    color: var(--pink-ink);
}

.lost h1 {
    margin: 6px 0 18px;
    font-size: var(--step-6);
    line-height: 1.2;
    color: var(--primary);
}

.lost a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--darkcolor);
    text-underline-offset: 2px;
}

@media (hover: hover) {
    .lost a:hover {
        color: var(--darkercolor);
    }
}

/* ---- back to top ---- */
/* A quiet ring rather than a gray disc; warms to pink on hover. */
.top-link {
    width: 36px;
    height: 36px;
    padding: 11px;
    background: var(--theme);
    border: 1px solid var(--border);
    color: var(--secondary);
    transition: visibility 0.5s, opacity 0.6s ease, border-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) {
    .top-link:hover {
        color: var(--pink-ink);
        border-color: var(--pink);
    }
}

/* Phones: the same scale on a 17px base (small steps never under 12px). */
@media (max-width: 560px) {
    :root {
        --step--3: 12px;
        --step--2: 13.4px;
        --step--1: 15.1px;
        --step-0: 17px;
        --step-1: 19.1px;
        --step-2: 21.5px;
        --step-3: 24.2px;
        --step-4: 27.2px;
        --step-5: 30.6px;
        --step-6: 34.4px;
        --step-7: 38.7px;
        --textsize: var(--step-0);
    }
}

@media (max-width: 560px) {
    .post-title {
        font-size: var(--step-5);
    }
}
