/*
 * @nera-static/theme-stack — look "Stack", for people who write about code.
 * Light grey page, white cards with a 2px ink border and a hard offset
 * shadow, one red, one lime, dark panels for code (ROADMAP-themes §S13).
 * No JavaScript, no third-party request; the webfonts below are served
 * from this site (§S11.2).
 */

/* Fonts: SIL Open Font License 1.1, see ../fonts/stack/OFL-*.txt.
   From @fontsource-variable/{bricolage-grotesque,inter,jetbrains-mono} 5.3.0. */
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('../fonts/stack/bricolage-grotesque-latin-ext-wght-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: 'Bricolage Grotesque';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('../fonts/stack/bricolage-grotesque-latin-wght-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: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/stack/inter-latin-ext-wght-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: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/stack/inter-latin-wght-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: 'Inter';
    font-style: italic;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/stack/inter-latin-ext-wght-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: 'Inter';
    font-style: italic;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/stack/inter-latin-wght-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: 'JetBrains Mono';
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url('../fonts/stack/jetbrains-mono-latin-ext-wght-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: 'JetBrains Mono';
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url('../fonts/stack/jetbrains-mono-latin-wght-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;
}

/* Every token read once, with its default (§S11.3), plus the few fixed
   colours of the look that are not tokens. */
:root {
    --bg: var(--theme-color-bg, #f4f5f7);
    --surface: var(--theme-color-surface, #ffffff);
    --text: var(--theme-color-text, #101319);
    --muted: var(--theme-color-muted, #555d6b);
    --accent: var(--theme-color-accent, #d02408);
    --accent-text: var(--theme-color-accent-text, #ffffff);
    --border: var(--theme-color-border, #d9dde4);
    --focus: var(--theme-color-focus, #1d4fe0);
    --night: var(--theme-color-night, #12151c);
    --night-text: var(--theme-color-night-text, #e7eaf0);
    --night-muted: var(--theme-color-night-muted, #98a2b3);
    --highlight: var(--theme-color-highlight, #d8f24a);
    --font-body: var(--theme-font-body, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    --font-heading: var(--theme-font-heading, 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    --font-mono: var(--theme-font-mono, 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace);
    --base: var(--theme-size-base, 1.0625rem);
    --measure: var(--theme-size-measure, 46rem);
    --width: var(--theme-size-width, 73rem);
    --radius: var(--theme-size-radius, 0);
    --space: var(--theme-size-space, 1.5rem);

    --ink: var(--text);
    --night-2: #1b202a;
    --night-line: #2c3340;
    --paper: #e4e7ec;
    --blue: #2b50ff;
    --mint: #7fe3b4;
    --sky: #8ec5ff;
    --salmon: #ff8a73;
    --gutter: 32px;
}

/* ---------- base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

img,
picture {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
    margin: 0;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -100px;
    z-index: 10;
    padding: 10px 16px;
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--ink);
    font-weight: 700;
}

.skip-link:focus {
    top: 12px;
}

/* A band's inner element carries the page width and gutter (§S12: no
   generic wrapper class). */
.site-header__inner,
.site-footer__inner,
.home-hero__inner,
.site-main > .post-list,
.site-main > .page__header,
.site-main > .page__body,
.site-main > .search,
.tag-page,
.post {
    max-width: calc(var(--width) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* boxed bands: the page width, the gutter outside */
.home-series,
.home-about,
.post-archive__year {
    width: min(var(--width), calc(100% - 2 * var(--gutter)));
    margin-inline: auto;
}

/* ---------- header ---------- */

.site-header {
    border-bottom: 2px solid var(--ink);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
    min-height: 72px;
    padding-block: 12px;
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    margin-right: auto;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.site-header__brand::after {
    content: '';
    width: 0.55em;
    height: 1.05em;
    margin-left: 0.18em;
    background: var(--accent);
}

.site-header__nav .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 26px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-weight: 600;
    font-size: 15px;
}

.site-header__nav .nav__link {
    display: inline-block;
    padding: 10px 0;
    border-bottom: 3px solid transparent;
    text-decoration: none;
}

.site-header__nav .nav__link:hover,
.site-header__nav .nav__link--active,
.site-header__nav .nav__link--active-path {
    border-bottom-color: var(--accent);
}

.lang-switch__list {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 13px;
}

.lang-switch__link {
    display: inline-block;
    padding: 10px 0;
}

span.lang-switch__link {
    color: var(--muted);
}

/* ---------- buttons ---------- */

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    min-height: 46px;
    padding: 0 20px;
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: 4px 4px 0 var(--ink);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
}

.button:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--ink);
}

.button--primary {
    background: var(--accent);
    color: var(--accent-text);
}

/* ---------- home: hero ---------- */

.home-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
    align-items: center;
    padding-block: 72px 80px;
}

.home-hero__title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(48px, 7.4vw, 108px);
    line-height: 0.92;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.home-hero__lead {
    max-width: 34em;
    margin-top: 28px;
    font-size: 20px;
    line-height: 1.5;
    color: var(--muted);
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 36px;
}

/* The page body beside the hero: the starter's bash fence becomes the
   terminal card on a red offset block. */
.home-hero__aside {
    position: relative;
}

.home-hero__aside::before {
    content: '';
    position: absolute;
    inset: 22px -22px -22px 22px;
    background: var(--accent);
}

.home-hero__aside > * {
    position: relative;
}

.home-hero__aside .nera-code {
    --nera-code-margin: 0;
    box-shadow: none;
    margin: 0;
}

.home-hero__aside .nera-code .nera-code__bar {
    padding: 12px 16px;
    min-height: 0;
}

.home-hero__aside .nera-code .nera-code__title b {
    padding: 0;
    background: none;
    border: 0;
    color: var(--night-muted);
}

.home-hero__aside .nera-code .nera-code__pre {
    padding: 20px 22px 26px;
}

/* ---------- topics band (plugin-tags' tag cloud) ---------- */

/* One line, however many tags the site has: plugin-tags lists every tag
   of the page's language, so the band scrolls sideways instead of wrapping. */
.tag-cloud {
    display: flex;
    flex-wrap: nowrap;
    gap: 0 40px;
    overflow-x: auto;
    padding: 6px max(var(--gutter), calc((100% - var(--width)) / 2));
    background: var(--ink);
    color: #ffffff;
    scrollbar-color: var(--night-muted) var(--ink);
    scrollbar-width: thin;
}

.post-archive__year + .tag-cloud,
.page__body + .tag-cloud {
    margin-top: 72px;
}

.tag-cloud__item {
    display: inline-flex;
    flex: none;
    white-space: nowrap;
    align-items: center;
    min-height: 52px;
    padding: 14px 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.tag-cloud__item:hover {
    color: var(--highlight);
}

/* ---------- post lists and cards ---------- */

.site-main > .post-list {
    padding-top: 80px;
}

.post-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.post-list__title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 44px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.post-list__more {
    font-weight: 700;
    font-size: 15px;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.post-list__items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    flex: 1 0 100%;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.post-list__item {
    display: flex;
}

.post-list__item:has(.post-card--featured) {
    grid-column: 1 / -1;
}

.post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
}

.post-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    padding: 22px 22px 24px;
}

.post-card__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 25px;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.post-card__link {
    text-decoration: none;
}

/* the whole card is the link's target */
.post-card__link::after {
    content: '';
    position: absolute;
    inset: 0;
}

.post-card__excerpt {
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.5;
}

.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: auto;
    padding-top: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

.post-card__media {
    border-bottom: 2px solid var(--ink);
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.post-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* type as picture, for a post without one */
.post-card__cover {
    display: flex;
    align-items: flex-end;
    aspect-ratio: 16 / 10;
    padding: 20px;
    overflow: hidden;
    border-bottom: 2px solid var(--ink);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: clamp(34px, 3.7vw, 54px);
    line-height: 0.9;
    letter-spacing: -0.06em;
    overflow-wrap: anywhere;
}

.post-card__cover--red {
    background: var(--accent);
    color: var(--accent-text);
}

.post-card__cover--night {
    background: var(--night);
    color: var(--highlight);
}

.post-card__cover--lime {
    background: var(--highlight);
    color: var(--ink);
}

.post-card__cover--paper {
    background: var(--paper);
    color: var(--ink);
}

.post-card__cover--blue {
    background: var(--blue);
    color: #ffffff;
}

.post-card__cover--mint {
    background: var(--mint);
    color: var(--ink);
}

.post-card--featured {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
}

.post-card--featured .post-card__cover,
.post-card--featured .post-card__media {
    aspect-ratio: auto;
    min-height: 400px;
    padding: 36px;
    border-bottom: 0;
    border-right: 2px solid var(--ink);
    font-size: clamp(52px, 7vw, 104px);
}

.post-card--featured .post-card__media {
    padding: 0;
}

.post-card--featured .post-card__body {
    justify-content: center;
    gap: 18px;
    padding: 44px;
}

.post-card--featured .post-card__title {
    font-weight: 800;
    font-size: 46px;
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.post-card--featured .post-card__excerpt {
    font-size: 18px;
    line-height: 1.6;
}

.post-card--featured .post-card__meta {
    margin-top: 0;
}

/* ---------- home: featured series ---------- */

.site-main > .home-series {
    margin-top: 80px;
}

.home-series {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 56px;
    padding: 56px;
    background: var(--night);
    color: var(--night-text);
}

.home-series p {
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--highlight);
}

.home-series h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 46px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.home-series .button {
    margin-top: 28px;
    background: var(--highlight);
    color: var(--ink);
    border-color: var(--highlight);
    box-shadow: none;
}

.home-series ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: part;
}

.home-series li {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px;
    align-items: baseline;
    padding: 18px 0;
    border-top: 1px solid var(--night-line);
    counter-increment: part;
}

.home-series li:last-child {
    border-bottom: 1px solid var(--night-line);
}

.home-series li::before {
    content: counter(part, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--highlight);
}

.home-series li a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 23px;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.home-series li a:hover {
    color: var(--highlight);
}

/* ---------- home: about ---------- */

.site-main > .home-about {
    margin-top: 80px;
}

.home-about {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 32px;
    align-items: center;
    padding: 36px;
    background: var(--surface);
    border: 2px solid var(--ink);
}

.home-about__mark,
.post-author__mark {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    background: var(--highlight);
    color: var(--ink);
    border: 2px solid var(--ink);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 34px;
    letter-spacing: -0.04em;
}

.home-about p:first-child {
    margin-bottom: 4px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.home-about h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.home-about h2 + p {
    max-width: 46em;
    margin-top: 6px;
    color: var(--muted);
}

.home-about__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.home-about__links .button {
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
    box-shadow: 3px 3px 0 var(--ink);
}

/* ---------- links that open a new tab ---------- */

/* A site that opens external links in a new tab (plugin-link-attributes in
   content, plugin-social-media-links' open_in_new_tab) gets them marked with
   an arrow, so the change of context is announced visually (WCAG 3.2.5). */
a[target='_blank']::after {
    content: '\00a0\2197';
    display: inline-block;
    text-decoration: none;
}

/* ---------- footer ---------- */

.site-footer {
    margin-top: 96px;
    border-top: 2px solid var(--ink);
}

/* the archive ends with the topics band, the footer sits right under it */
.site-main:has(> .tag-cloud:last-child) + .site-footer {
    margin-top: 0;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    padding-block: 28px;
    font-size: 14px;
    color: var(--muted);
}

.site-footer a {
    text-underline-offset: 4px;
}

.site-footer .social-media-links__list,
.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer .social-media-links__icon:empty {
    display: none;
}

.site-footer__copy {
    margin-left: auto;
}

/* ---------- post ---------- */

.post {
    display: grid;
    grid-template-columns: 230px minmax(0, var(--measure)) minmax(0, 1fr);
    column-gap: 72px;
    align-items: start;
}

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

.post__header {
    grid-column: 1 / -1;
    padding-block: 64px 48px;
}

.post__series {
    margin-bottom: 26px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

.post__title,
.page__title,
.tag-overview__title {
    max-width: 980px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(40px, 5.6vw, 80px);
    line-height: 0.96;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.post__lead,
.page__lead {
    max-width: 38em;
    margin-top: 26px;
    font-size: 22px;
    line-height: 1.45;
    color: var(--muted);
}

.post__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 16px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 2px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

.post-author {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-right: auto;
}

.post-author__mark {
    width: 44px;
    height: 44px;
    font-size: 17px;
}

.post-author__name {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.post__media {
    margin-bottom: 48px;
    border: 2px solid var(--ink);
}

.post__image {
    width: 100%;
}

.post-facts {
    grid-column: 1;
    padding: 16px 18px;
    background: var(--surface);
    border: 2px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 13.5px;
}

.post-facts__item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-top: 1px solid var(--border);
}

.post-facts__item:first-child {
    border-top: 0;
}

.post-facts__label {
    color: var(--muted);
}

.post-facts__value {
    font-weight: 600;
}

/* ---------- running text (posts and pages) ---------- */

.post__body,
.page__body {
    font-size: 18.5px;
    line-height: 1.7;
}

.post__body > * + *,
.page__body > * + * {
    margin-top: var(--space);
}

.post__body h2,
.page__body h2 {
    margin-top: 56px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 36px;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.post__body h3,
.page__body h3 {
    margin-top: 40px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 25px;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.post__body a,
.page__body a {
    color: var(--accent);
    font-weight: 500;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.post__body :not(pre) > code,
.page__body :not(pre) > code {
    padding: 0.12em 0.38em;
    background: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.84em;
}

.post__body ul,
.page__body ul {
    padding-left: 0;
    list-style: none;
}

.post__body ul li,
.page__body ul li {
    position: relative;
    margin-top: 8px;
    padding-left: 28px;
}

.post__body ul li::before,
.page__body ul li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.62em;
    width: 10px;
    height: 10px;
    background: var(--accent);
}

.post__body ol,
.page__body ol {
    padding-left: 1.4em;
}

/* a blockquote is the theme's one emphasised box: the lime note */
.post__body blockquote,
.page__body blockquote {
    margin-top: 32px;
    padding: 22px 24px;
    background: var(--highlight);
    color: var(--ink);
    border: 2px solid var(--ink);
    font-size: 17px;
    line-height: 1.55;
}

.post__body blockquote > * + *,
.page__body blockquote > * + * {
    margin-top: 12px;
}

.post__body blockquote strong:first-child,
.page__body blockquote strong:first-child {
    display: block;
    font-family: var(--font-heading);
    font-size: 19px;
    letter-spacing: -0.02em;
}

.post__body table,
.page__body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    background: var(--surface);
    border: 2px solid var(--ink);
}

.post__body th,
.post__body td,
.page__body th,
.page__body td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.post__body th,
.page__body th {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
}

.post__body td:not(:first-child),
.post__body th:not(:first-child),
.page__body td:not(:first-child),
.page__body th:not(:first-child) {
    text-align: right;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.post__body tr:last-child td,
.page__body tr:last-child td {
    border-bottom: 0;
}

.post__body img,
.page__body img {
    border: 2px solid var(--ink);
}

.nera-image__caption {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

/* ---------- code (plugin-code-blocks, §S4.4 mapping) ---------- */

.nera-code-scope,
.nera-code {
    --nera-code-bg: var(--theme-color-night, #12151c);
    --nera-code-ink: var(--theme-color-night-text, #e7eaf0);
    --nera-code-muted: var(--theme-color-night-muted, #98a2b3);
    --nera-code-accent: #ff8a73;
    --nera-code-string: #7fe3b4;
    --nera-code-symbol: #8ec5ff;
    --nera-code-line: #2c3340;
    --nera-code-font: var(--theme-font-mono, 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace);
    --nera-code-radius: var(--theme-size-radius, 0);
    --nera-code-size: 14.5px;
    --nera-code-margin: 26px 0 0;
}

.nera-code,
.nera-code-scope pre:not(.nera-code__pre) {
    border: 2px solid var(--ink) !important;
    box-shadow: 8px 8px 0 var(--border);
    margin-right: -60px;
}

.nera-code-scope pre:not(.nera-code__pre) {
    padding: 20px 22px;
    background: var(--night);
    color: var(--night-text);
    font-family: var(--font-mono);
    font-size: 14.5px;
    line-height: 1.75;
    overflow-x: auto;
}

.nera-code .nera-code__bar {
    min-height: 0;
    padding: 0 18px 0 0;
    font-size: 13px;
    letter-spacing: 0;
}

.nera-code .nera-code__title b {
    display: inline-block;
    margin-right: 8px;
    padding: 12px 18px;
    background: var(--night-2);
    border-right: 1px solid var(--night-line);
    color: var(--night-text);
    font-weight: 500;
}

.nera-code .nera-code__pre {
    padding: 20px 22px;
    line-height: 1.75;
}

.nera-code .hljs-addition,
.nera-code .hljs-deletion {
    display: inline-block;
    min-width: calc(100% + 44px);
    margin-inline: -22px;
    padding-inline: 19px 22px;
    color: var(--night-text);
}

.nera-code .hljs-addition {
    background: rgb(127 227 180 / 12%);
    box-shadow: inset 3px 0 0 var(--mint);
}

.nera-code .hljs-deletion {
    background: rgb(255 138 115 / 12%);
    box-shadow: inset 3px 0 0 var(--salmon);
}

/* ---------- post footer: tags, series, previous / next ---------- */

.post__footer {
    display: grid;
    gap: 32px;
    margin-top: 64px;
}

.post__tags:empty,
.post__pagination:empty {
    display: none;
}

.tag-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-links__item {
    display: inline-block;
    padding: 3px 9px;
    background: var(--surface);
    border: 1.5px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
}

.tag-links__item:hover {
    background: var(--highlight);
}

.post-series {
    padding: 28px 30px;
    background: var(--night);
    color: var(--night-text);
}

.post-series__title {
    margin-bottom: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.post-series__list {
    padding: 0;
    list-style: none;
}

.post-series__item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 11px 0;
    border-top: 1px solid var(--night-line);
    font-size: 16px;
}

.post-series__item span {
    padding-top: 3px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--highlight);
}

.post-series__item a {
    text-decoration: none;
}

.post-series__item a:hover {
    text-decoration: underline;
}

.post-series__item--current a {
    color: var(--highlight);
    font-weight: 700;
}

.page-pagination {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.page-pagination__link {
    display: block;
    padding: 22px 24px;
    background: var(--surface);
    border: 2px solid var(--ink);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.page-pagination__link::before,
.page-pagination__link::after {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--accent);
}

.page-pagination__link--previous::before {
    content: '← ';
}

.page-pagination__link--next {
    grid-column: 2;
    text-align: right;
}

.page-pagination__link--next::after {
    content: ' →';
}

/* ---------- pages: header ---------- */

.page__header {
    padding-block: 64px 40px;
}

.page__lead {
    margin-top: 20px;
}

.site-main > .page__body,
.site-main > .search {
    max-width: calc(var(--measure) + 2 * var(--gutter));
    margin-inline: 0;
    margin-left: max(0px, calc((100% - var(--width)) / 2 - var(--gutter)));
}

/* ---------- archive ---------- */

.post-archive__year {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 40px;
    padding-block: 36px 40px;
    border-bottom: 2px solid var(--ink);
}

.page__header + .post-archive__year,
.page__body + .post-archive__year {
    border-top: 2px solid var(--ink);
}

.post-archive__year h2 {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 56px;
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.post-archive__count {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--muted);
}

.post-archive__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.post-archive__item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 20px;
    align-items: baseline;
    padding: 13px 0;
    border-top: 1px solid var(--border);
}

.post-archive__item:first-child {
    padding-top: 0;
    border-top: 0;
}

.post-archive__item time {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

.post-archive__item a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.post-archive__item a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
}

/* ---------- tag page (plugin-tags' tag overview) ---------- */

.tag-overview__header {
    padding-block: 64px 40px;
}

.tag-overview__title::before {
    content: '#';
    color: var(--accent);
}

.tag-overview__image {
    margin-top: 24px;
    border: 2px solid var(--ink);
}

.tag-overview__content {
    display: grid;
    gap: 24px;
    max-width: 980px;
}

.tag-overview__item {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    column-gap: 28px;
    padding: 26px 28px;
    background: var(--surface);
    border: 2px solid var(--ink);
}

.tag-overview__item > * {
    grid-column: 2;
}

.tag-overview__item-date {
    grid-column: 1;
    grid-row: 1 / span 3;
    padding-top: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

.tag-overview__item-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.tag-overview__item-description {
    margin-top: 8px;
    color: var(--muted);
}

.tag-overview__item-link {
    justify-self: start;
    margin-top: 12px;
    font-weight: 700;
    font-size: 15px;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* the whole entry is the link's target */
.tag-overview__item-link::after {
    content: '';
    position: absolute;
    inset: 0;
}

/* ---------- search (plugin-search, on the site's own search page) ---------- */

.search__input {
    display: block;
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 18px;
    appearance: none;
}

.search__input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.search__input:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

/* the results read like the archive's rows: heavy rule above and below,
   a hairline between */
.search__results {
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
    border-block: 2px solid var(--ink);
}

/* before typing and without a match the list is empty: no box at all */
.search__results:empty {
    display: none;
}

.search__item {
    padding: 18px 0;
}

.search__item + .search__item {
    border-top: 1px solid var(--border);
}

.search__link {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.search__link:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
}

.search__description {
    margin-top: 6px;
    font-size: 15px;
    color: var(--muted);
}

/* a match in the muted description: the text colour on lime, the pair §S13
   defines for the highlight */
.search__highlight {
    padding: 0 2px;
    background: var(--highlight);
    color: var(--text);
}

/* plugin-search's "no results" message, after the (then empty, hidden)
   list: muted text on the page background, the pair §S13 pins. No display
   here, so the client's hidden attribute stays in charge; while there are
   hits it is also empty, and takes no space. */
.search__empty {
    margin: 40px 0 0;
    color: var(--muted);
}

.search__empty:empty {
    display: none;
}

/* ---------- motion: only for those who do not mind it ---------- */

@media (prefers-reduced-motion: no-preference) {
    .button,
    .post-card,
    .page-pagination__link,
    .tag-overview__item {
        transition: transform 0.12s ease, box-shadow 0.12s ease;
    }

    .post-card:hover,
    .page-pagination__link:hover,
    .tag-overview__item:hover {
        box-shadow: 6px 6px 0 var(--ink);
        transform: translate(-3px, -3px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .button:hover {
        transform: none;
    }
}

/* ---------- one column below 900px ---------- */

@media (max-width: 900px) {
    :root {
        --gutter: 20px;
    }

    .home-hero__inner,
    .post-card--featured,
    .home-series,
    .post {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-hero__inner {
        gap: 40px;
        padding-block: 40px 56px;
    }

    .home-hero__aside::before {
        inset: 14px -10px -14px 14px;
    }

    .home-hero__aside .nera-code {
        --nera-code-size: 12.5px;
    }

    .tag-cloud {
        gap: 0 24px;
    }

    .tag-cloud__item {
        min-height: 44px;
        padding: 10px 0;
        font-size: 18px;
    }

    .site-main > .post-list {
        padding-top: 56px;
    }

    .site-main > .home-series,
    .site-main > .home-about {
        margin-top: 56px;
    }

    .post-list__title {
        font-size: 34px;
    }

    .post-list__items {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .post-card--featured .post-card__cover,
    .post-card--featured .post-card__media {
        min-height: 0;
        aspect-ratio: 16 / 10;
        padding: 20px;
        border-right: 0;
        border-bottom: 2px solid var(--ink);
        font-size: clamp(34px, 11vw, 54px);
    }

    .post-card--featured .post-card__media {
        padding: 0;
    }

    .post-card--featured .post-card__body {
        padding: 24px;
    }

    .post-card--featured .post-card__title {
        font-size: 32px;
    }

    .home-series {
        gap: 28px;
    }

    .home-series {
        padding: 28px 22px;
    }

    .home-about {
        padding: 24px;
    }

    .home-series h2 {
        font-size: 34px;
    }

    .home-series li {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .home-about {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-header__nav {
        order: 3;
        width: 100%;
    }

    .site-header__nav .nav {
        gap: 0 22px;
    }

    .post {
        row-gap: 36px;
    }

    .post-facts,
    .post > * {
        grid-column: 1;
    }

    .nera-code,
    .nera-code-scope pre:not(.nera-code__pre) {
        margin-right: 0;
    }

    .post__body,
    .page__body {
        font-size: 17.5px;
    }

    .post-author {
        margin-right: 0;
        width: 100%;
    }

    .page-pagination {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-pagination__link--next {
        grid-column: 1;
        text-align: left;
    }

    .post-archive__year {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding-block: 26px;
    }

    .post-archive__year h2 {
        font-size: 44px;
    }

    .post-archive__item {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .post-archive__item a,
    .search__link {
        font-size: 20px;
    }

    .tag-overview__item {
        grid-template-columns: minmax(0, 1fr);
        padding: 20px;
    }

    .tag-overview__item > *,
    .tag-overview__item-date {
        grid-column: 1;
        grid-row: auto;
    }

    .tag-overview__item-title {
        font-size: 24px;
    }
}
