@media (min-width: 48em) {
    .bullet {
        margin-left: 1em;
        text-decoration-line: underline;
        text-decoration-style: dotted;
        text-decoration-thickness: 1%;
    }
    .sub-heading {
        margin-left: 1em;
    }
    .btn-light-dark svg {
        margin: auto;
        width: 20px;
        height: 20px;
        color: black;
    }
}

@media (max-width: 48em) {
    .heading {
        font-weight: 400;
    }
    .entries {
        padding-left: 0em;
    }
    .btn-light-dark svg {
        margin: auto;
        width: 20px;
        height: 20px;
        color: black;
    }
}

 /* Handles dark/light themes */
h1, h2, h3, h4, h5, strong {
    color: var(--text-color);
}
.content p {
    color: var(--text-color);
}
.page-title, .post-title, .post-title a {
    color: var(--post-title-color);
    font-weight: 550;
}
.content li {
    color: var(--text-color);
}
.content :not(pre) > code {
    color: var(--code-color);
    background-color: var(--code-background-color);
    /* A path or a long flag is one unbreakable word: at 320px it pushed the page
       76px sideways (documentElement.scrollWidth 400). */
    overflow-wrap: anywhere;
}
.btn-light-dark .moon {
    color: var(--text-color);
}
.btn-light-dark .sun {
    color: var(--text-color);
}
.btn-light-dark {
    padding: 5px auto;
    display: block;
    /* margin: 0 10px; */
    margin: 0;
    margin-right: 10px;
    /*border-radius: 50%;*/
    border: none;
    cursor: pointer;
    /*text-align: center;*/
    width: 40px;
    height: 40px;
    background-color: transparent;
}
.btn-light-dark:hover > svg {
    color: var(--link-color);
    transition: 250ms;
}

@media screen and (min-width: 68em) and (min-height: 30em) {
    .layout-reverse .sidebar {
        left: auto;
        right: 0;
        position: fixed;
        top: 0;
        bottom: 0;
        width: 18rem;
    }

    .layout-reverse .content {
        margin-left: 2rem;
        /* 18rem = exactly the fixed sidebar's own width: the content column's right edge
           lands on the panel's left edge instead of 40px short of it (20rem left a dead
           band, and the corner ear parked inside it). Measured: ear-to-sidebar gap 40px at
           every width from 1100 to 1920 before this line, 0 after. */
        margin-right: 18rem;
    }
}

@media screen and (min-width: 68em) and (min-height: 30em) {
    /* Was 20rem, not 22rem: 22rem left a 120px band of nothing between the article and the
       18rem sidebar at 1280. 20rem still left 40px - the gap the corner ear sits in. Now
       18rem, flush with the panel. */
    .layout-reverse .content {
        margin-left: 4rem;
        margin-right: 18rem;
    }
}

/* 68em-90em: the left gutter the floating TOC needs only exists from 90em, and
   below it the rail was display:none - a 3,621-word, 15-heading article on a
   1280x800 laptop had no navigation aid at all. Show it inline at the top of
   the post instead, in two columns so it does not eat the article. */
@media screen and (min-width: 68em) and (max-width: 89.9375em) {
    /* .post prefix: the base .article-toc.layout-reverse rule (display:none)
       appears later in this file, so equal specificity would lose to it. */
    .post .article-toc.layout-reverse {
        display: block;
        position: static;
        width: auto;
        max-width: 36em;
        max-height: none;
        overflow: visible;
        margin: 0 0 1.5rem;
        padding: 0.9rem 1.1rem 1rem;
        border: 1px solid var(--sidebar-bg-color);
        border-radius: 6px;
    }
    /* Hugo's TOC here is nav > ol > li with nested ol for deeper levels
       (tableOfContents.ordered = true). Column only the top list; columning every ol -
       nested ones included - produced overlapping fragments.

       Break at leaf boundaries only: a leaf entry (no nested ol) stays atomic, so no line
       of text is ever cut in half; any list that has subsections may split between them.
       With every top-level li atomic, the balancer has nothing to work with when one
       section dwarfs the rest - UMP MkII put 227px in the left column and 93px in the
       right, because subsection 3.1 alone is 159px tall and could not move. Chromium's
       column-fill: balance is a heuristic, so what actually makes the columns even is
       fine break granularity, not the keyword. */
    .post .article-toc.layout-reverse nav > ol {
        columns: 2;
        column-gap: 1.4rem;
        column-fill: balance;
        margin: 0;
    }
    .post .article-toc.layout-reverse nav li:has(> ol) {
        break-inside: auto;
    }
    .post .article-toc.layout-reverse nav li:not(:has(> ol)) {
        break-inside: avoid;
    }
    /* The base rule indents each nesting level by 20px, so a third-level entry
       is pushed 60px right and wraps into four lines inside a 300px column.
       Flatten the indents and drop the size - every level stays listed. */
    .post .article-toc.layout-reverse nav ol {
        font-size: 0.82em;
        line-height: 1.35;
    }
    .post .article-toc.layout-reverse nav li {
        margin-left: 0.55em;
    }
    .post .article-toc.layout-reverse h4 {
        margin: 0 0 0.4rem;
        font-size: 0.85em;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--date-color);
    }
}


/* ************************** */
/* fixed overpadding here */
@media screen and (min-width: 90em) and (min-height: 30em) {
    .layout-reverse .content.no-toc-left-mrg {
        max-width: none;
        margin-left: 4rem !important;
    }

    .layout-reverse .content:not(.no-toc-left-mrg) {
        max-width: none;
        margin-left: 20rem;
        margin-right: 18rem;
    }

    .article-toc.layout-reverse {
        left: 2rem;
        width: 14rem;
        padding-left: 0;
        padding-right: 0;
    }
    /* The base rule indents h4 by 6em for the non-reversed layout; the rail has
       no room for it. But margin 0 put the CONTENTS label on the viewport's left edge
       (x=0) while its entries hang 60px in - the list's own 40px padding plus the 20px
       li margin. The heading now sits on the line its items start from. */
    .article-toc.layout-reverse h4 {
        margin: 0 0 0.4rem 60px;
        font-size: 0.8em;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--date-color);
    }
}
.sidebar {
    background-color: var(--sidebar-bg-color);
}
.sidebar-about img {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    border: 2px solid var(--sidebar-img-border-color);
    border-radius: 50%;
    height: 180px;
    width: 180px;
}

.sidebar .categories h4 {
    color: var(--sidebar-a-color);
}
.sidebar .categories ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding-left: 16px;
    justify-items: start;
}
.sidebar .categories li {
    text-wrap: nowrap;
    font-size: 0.9rem;
    margin-bottom: 0.2em;
}
@media (max-width: 58em) {
    .sidebar .categories li {
        margin-left: -5px;
    }
}
.sidebar .categories svg {
    fill: var(--text-color);
    width: 20px;
    height: 20px;
    margin-bottom: -2px;
    margin-right: 2px;
}
.sidebar .categories a {
    /* padding-bottom: 2px; */
    vertical-align: text-bottom;
}
.sidebar .categories li:hover a {
    color: var(--link-color);
    transition: 250ms;
}
.sidebar .categories li:hover svg {
    fill: var(--link-color);
    transition: 250ms;
}

#tag-cloud {
    padding: 0px 16px;
    overflow-y: scroll;
    max-height: calc(100vh - 55px - 232px - 7.4rem);
}
#tag-cloud a:hover {
    color: var(--link-color);
    transition: 250ms;
}
.cloudt {
    color: var(--sidebar-a-color);
}

.social {
    margin-right: 0.5em;
    text-decoration: none !important;
    /* color: var(--sidebar-socials-color) !important; */
}
.heading {
    margin-top: 1em;
}
.post-date {
    display: inline-block;
    color: var(--date-color);
}
.info span {
    display: inline-block;
}
.info ul {
    display: inline-block;
    /* Not floated. #breadcrumbs and ul.tags both live in .info; when the
       breadcrumb row wrapped onto a second and third line the float stopped
       reserving its line box, so the date/tag block underneath it overlapped
       the breadcrumb text and .datentagscont collapsed to 0 width. */
    float: none;
}
.info ul li {
    margin-left: 0.5em;
}
/* info bolder summary text */
.info-summary {
    color: var(--list-color);
    font-weight: 400;
}
.tags {
    padding-left: 0em;
}
.tags li {
    display: inline;
    text-decoration: none;
}
.tags li a {
    color: var(--sidebar-a-color);;
    display: inline-flex;
    padding: 0em 0.7em;
    text-align: center;
    font-size: 0.7em;
    background-color: var(--sidebar-bg-color);
    border-radius: 0.2em;
}
.tags li a:hover {
    color: var(--link-color);
    transition: 250ms;
}
.datentags {
    /* The date + tag pills used to be max-content wide inside a hidden-scrollbar
       strip, so on a phone the row simply stopped (28px hidden at 320px). */
    overflow-x: visible;
    -ms-overflow-style: none;
    scrollbar-width: none;
    margin-bottom: 0.6rem;
}
.datentags::-webkit-scrollbar {
    display: none;
    width: 0 !important
}
.datentagscont {
    width: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.5rem;
}
.datentags .post-date,
.datentags .tags {
    margin: 0 !important;
}
.post .info .post-series-header,
.info .post-series-header {
    clear: both;
    margin-top: 0.15rem;
    color: var(--date-color) !important;
}
.post .info .post-series-header .post-series-header-link,
.post .info .post-series-header .post-series-header-link:visited,
.info .post-series-header .post-series-header-link,
.info .post-series-header .post-series-header-link:visited {
    color: var(--date-color) !important;
    text-decoration: none;
}
.post .info .post-series-header .post-series-header-link:hover,
.post .info .post-series-header .post-series-header-link:focus,
.info .post-series-header .post-series-header-link:hover,
.info .post-series-header .post-series-header-link:focus {
    color: var(--link-color) !important;
    text-decoration: underline;
    transition: 250ms;
}
/* Year divider between the per-year <ul class="entries"> blocks. Sized and
   spaced to match the h3 it replaces (1.25rem, weight 400, centred, 30px above
   and 10px below) so the vertical rhythm of the listing is unchanged. The list's
   own 20px bottom margin collapses with this 30px top margin, exactly as the
   in-list h3's did. */
.entries-year {
    font-size: 1.25rem;
    font-weight: 400;
    text-align: center;
    color: var(--text-color);
    margin: 30px 0 10px;
}
/* Reading measure. Body width was whatever the chrome left over: 929px (~92
   characters at 20px type) on a short post at 1024, 833px at 1440, 813px at
   1700, but 483px at 1090 on the same article. Capped in em so the line holds
   the same number of characters whether the base type is 16px or 20px. */
.post p,
.post ul,
.post ol,
.post blockquote {
    max-width: 36em;
}
.entries li {
    display: flex;
}
.entries li .title {
    order: 1;
    max-width: 70%;
}
.entries li .published {
    order: 3;
    margin-left: 0.5rem;
    font-size: 0.8rem;
}
.entries li .readingtime {
    font-size: 0.8rem;
}
.entries li::after {
    background-image: radial-gradient(circle, currentcolor 1px, transparent 1.5px);
    background-position: bottom;
    background-size: 1ex 3.5px;
    background-repeat: space no-repeat;
    content: "";
    flex-grow: 1;
    height: 1.1em;
    order: 2;
}
.entries .desc {
    color: var(--text-color);
    display: inline;
}
/* Phone widths: the flex row squeezed the title into 70% of the column and the
   date into whatever was left, so a wrapped title and its italic summary
   interleaved with a two-line date ("SFF PC RAM Cooling Fan Mod January 26," /
   "2026"), and the dotted leader collapsed to a single stray dot. Stack the
   date above the entry instead and drop the leader. */
@media (max-width: 30em) {
    .entries li {
        flex-direction: column;
    }
    .entries li .published {
        order: 1;
        margin-left: 0;
        margin-bottom: 0.2rem;
    }
    .entries li .title {
        order: 2;
        max-width: none;
    }
    .entries li::after {
        display: none;
    }
}
.article-toc {
    display: none;
    position: fixed;
    left: 50%;
    top: 110px;
    font-size: 0.9em;
    font-weight: 300;
    width: auto /*20em*/;
    margin-left: 400px;
    padding-left: 20px;
    padding-right: 20px;
    line-height: 1.4em;
    max-height: 85%;

    /* border: 1px solid red; */
}
.article-toc nav {
    margin-left: 5em;
}
.article-toc.layout-reverse {
    display: none;
    position: fixed;
    left: 0%;
    top: 110px;
    font-size: 0.9em;
    width: 20em;
    margin-left: 0;
    overflow-y: auto;
    line-height: 1.4em;
    max-height: 85%;
}
.article-toc.layout-reverse nav {
    margin-left: 0;
}
.article-toc h4 {
    margin-left: 6em;
}
.article-toc ul {
    margin-bottom: 0;
}
.article-toc ol {
    counter-reset: item;
}
.article-toc li {
    list-style: upper-alpha;
    margin-left: 20px;
    margin-top: 2px;
    display: block;
}
.article-toc li::before {
    content: counters(item, ".") " ";
    counter-increment: item;
    font-weight: 500;
}
.article-toc li a {
    color: var(--text-color);
    text-decoration: none;
}
.article-toc li.active {
    font-weight: bold;
}
.article-toc li.inactive {
    font-weight: 300;
}
@media screen and (min-width: 90em) {
    .article-toc {
        display: block;
    }
    .article-toc.layout-reverse {
        display: block;
    }
}
/* justifiedGallery sizes each row to fill the container it measured, then adds
   the inter-entry margins - so the painted rows end up a few pixels wider than
   the box that holds them. .justified-gallery is overflow:hidden, which silently
   ate a strip off the last photo of every row: 840px of entries in an 833px
   container at 1440, 326 in 311 at 390. Reserving a right gutter equal to the
   galleries' margins (10px) makes the measured layout width agree with what
   actually fits. */
.justified-gallery {
    padding-right: 18px;
}
.content pre {
    /* Hugo writes the chroma background inline on the pre
       (style="color:#f8f8f2;background-color:#000;…"), so a plain declaration
       cannot win. Every fenced block gets the one code surface instead. */
    background-color: var(--code-block-background-color) !important;
    border-radius: 5px;
    border: 2px solid var(--sidebar-bg-color);
}
/* syntax.css gives .bg and .chroma their own #000 background, so highlighted
   blocks painted pure black while a non-highlighted block on the same page used
   the theme surface. One surface for every code block now. */
.content .highlight,
.content .chroma,
.content .bg,
.content table.lntable {
    background-color: var(--code-block-background-color);
}
.content .highlight pre,
.content .chroma pre {
    background-color: transparent;
}
.content pre code {
    color: var(--text-color);
    white-space: pre;
}
div.highlight pre {
    overflow-x: auto;
}
#page-nav {
    text-align: center;
}
#page-nav a {
    margin: 0 0.2em;
}
#page-nav span {
    margin: 0 0.2em;
}
.next {
    float: right;
    display: inline;
}
.prev {
    float: left;
    display: inline;
}
.current {
    color: var(--text-color);
}

/* fix bottom padding of info partial */

.info > h1 {
    margin-bottom: 0;
}

/* larger listing font */
/* .entries {
    font-size: 20px;
} */

.entries > li {
    padding-bottom: 1em;
}

/* Post title github icon */ /* GitHub Icon on card list */
.post-title .title-github-icon, .card .listing-github-icon, .entries .listing-github-icon {
    fill: var(--text-color);
    display:inline-block;
    height:1em;
    width:auto;
    transform:translate(0, 0.2em)
}
.entries .listing-github-icon-link {
    text-decoration: none;
    text-decoration-line: none;
}

/* top-bottom margin for photo galleries */
.gallery-wrapper {
    margin: 20px 0;
}

/* Taxonomy terms overview (/tags/, /categories/, /series/) */
.terms-list {
    list-style: none;
    padding: 0;
    margin: 1.5em 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 0.6em;
    align-items: center;
}

.terms-list__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.3em 0.75em;
    border: 1px solid var(--list-color);
    border-radius: 999px;
    background-color: transparent;
    line-height: 1.25;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.terms-list__item:hover {
    border-color: var(--link-color);
    background-color: rgba(55, 207, 165, 0.06);
    transform: translateY(-1px);
}

.terms-list__name {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.terms-list__item:hover .terms-list__name {
    color: var(--link-color);
}

.terms-list__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62em;
    font-weight: 400;
    color: var(--date-color);
    background-color: var(--sidebar-bg-color);
    border-radius: 999px;
    padding: 0 0.6em;
    min-width: 1.6em;
    height: 1.6em;
    line-height: 1;
}
