/*
 * @nera-static/theme-blog — "Plain" (ROADMAP-themes §S4.4).
 *
 * Black on white, one system sans-serif, no colour. The page has two axes:
 * a narrow margin on the left that holds dates and years, and the column
 * beside it that holds the words. The margin is the difference between
 * --theme-size-width and --theme-size-measure; below 48rem it folds away and
 * everything stacks. Links are underlined, never coloured.
 *
 * Every token is read as var(--theme-…, <default>), so the page is styled
 * even without the inline token <style>. Selectors use the theme's public
 * classes (§S4.6) and the plugin classes of §S4.5 only.
 *
 * No animation, no smooth scrolling; transitions only for visitors who have
 * not asked for reduced motion. No web fonts, no url().
 */

/* --- Base ---------------------------------------------------------------- */

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

/* size.base is the body text size (§S11.3); the root font size stays the
   browser's, so rem keeps its meaning in all four blog themes. */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-size: var(--theme-size-base, 1.0625rem);
    background: var(--theme-color-bg, #ffffff);
    color: var(--theme-color-text, #141414);
    font-family: var(--theme-font-body, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    line-height: 1.65;
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: calc(var(--theme-size-space, 1.5rem) * 1.75) 0 calc(var(--theme-size-space, 1.5rem) * 0.5);
    font-family: var(--theme-font-heading, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.125rem, 1.3813rem + 3vw, 3.0547rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 1.4609rem;
}

h3 {
    font-size: 1.1953rem;
}

h4,
h5,
h6 {
    font-size: 1.0625rem;
}

p,
ul,
ol,
dl,
blockquote,
table,
figure {
    margin: 0 0 var(--theme-size-space, 1.5rem);
}

li + li {
    margin-top: 0.35em;
}

a {
    color: var(--theme-color-accent, #000000);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--theme-color-muted, #676767);
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 2px;
    text-decoration-color: currentColor;
}

:focus-visible {
    outline: 2px solid var(--theme-color-focus, #141414);
    outline-offset: 3px;
}

img,
picture,
svg,
video {
    max-width: 100%;
    height: auto;
}

img {
    display: block;
}

hr {
    margin: calc(var(--theme-size-space, 1.5rem) * 2) 0;
    border: 0;
    border-top: 1px solid var(--theme-color-border, #e4e4e2);
}

blockquote {
    margin-left: 0;
    padding-left: 1.3281rem;
    border-left: 2px solid var(--theme-color-text, #141414);
}

blockquote > :last-child {
    margin-bottom: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9563rem;
}

th,
td {
    padding: 0.55em 0.75em 0.55em 0;
    border-bottom: 1px solid var(--theme-color-border, #e4e4e2);
    text-align: left;
    vertical-align: top;
}

th {
    border-bottom-color: var(--theme-color-text, #141414);
    font-weight: 600;
}

code,
kbd,
samp,
pre {
    font-family: var(--theme-font-mono, ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace);
}

code {
    padding: 0.12em 0.35em;
    background: var(--theme-color-surface, #f5f5f4);
    border-radius: var(--theme-size-radius, 0.375rem);
    font-size: 0.85em;
}

pre {
    margin: 0 0 var(--theme-size-space, 1.5rem);
    padding: 1.0625rem 1.2219rem;
    overflow-x: auto;
    background: var(--theme-color-surface, #f5f5f4);
    border-radius: var(--theme-size-radius, 0.375rem);
    font-size: 0.8713rem;
    line-height: 1.6;
}

pre code {
    padding: 0;
    background: none;
    font-size: inherit;
}

/* --- Skip link ----------------------------------------------------------- */

.skip-link {
    position: absolute;
    top: 0.5313rem;
    left: 0.5313rem;
    z-index: 10;
    padding: 0.5313rem 0.9563rem;
    background: var(--theme-color-accent, #000000);
    color: var(--theme-color-accent-text, #ffffff);
    font-size: 0.9563rem;
}

.skip-link:not(:focus) {
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* --- Header -------------------------------------------------------------- */

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5313rem 1.8594rem;
    max-width: calc(var(--theme-size-width, 50rem) + 3rem);
    margin: 0 auto;
    padding: 2.125rem 1.5938rem;
}

.site-header__brand {
    margin-right: auto;
    color: var(--theme-color-text, #141414);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.site-header__nav {
    font-size: 0.9563rem;
}

/* plugin-navigation, through the nav-main seam */
.site-header__nav .nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header__nav .nav--list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2656rem 1.5938rem;
}

.site-header__nav .nav__item {
    margin: 0;
}

.site-header__nav .nav__link {
    color: var(--theme-color-muted, #676767);
    text-decoration: none;
}

.site-header__nav .nav__link:hover {
    color: var(--theme-color-text, #141414);
    text-decoration: underline;
}

.site-header__nav .nav__link--active,
.site-header__nav .nav__link--active-path {
    color: var(--theme-color-text, #141414);
}

.site-header__nav .nav__link--active {
    font-weight: 600;
}

/* --- Language switch ----------------------------------------------------- */

.lang-switch {
    font-size: 0.9563rem;
}

.lang-switch__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7969rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lang-switch__item {
    margin: 0;
}

.lang-switch__link {
    color: var(--theme-color-muted, #676767);
}

span.lang-switch__link {
    color: var(--theme-color-text, #141414);
    font-weight: 600;
}

/* --- Main: the margin and the column -------------------------------------- */

.site-main {
    max-width: calc(var(--theme-size-width, 50rem) + 3rem);
    margin: 0 auto;
    padding: calc(var(--theme-size-space, 1.5rem) * 2) 1.5rem calc(var(--theme-size-space, 1.5rem) * 4);
}

.page__header,
.page__body,
.post-list__title,
.post-list__more,
.post__media,
.post__body,
.post__footer,
.tag-cloud,
.tag-overview__header,
.search {
    max-width: var(--theme-size-measure, 38.25rem);
}

/* The blocks that use the margin themselves are as wide as margin and
   column together. */
.post-list__items,
.home-series,
.home-highlight,
.home-about,
.post-archive__year {
    max-width: var(--theme-size-width, 50rem);
}

.page__header,
.post__header {
    margin-bottom: calc(var(--theme-size-space, 1.5rem) * 1.5);
}

.page__title,
.post__title,
.tag-overview__title {
    margin: 0 0 0.35em;
}

.page__lead,
.post__lead {
    margin: 0;
    color: var(--theme-color-muted, #676767);
    font-size: 1.275rem;
    line-height: 1.5;
    text-wrap: pretty;
}

.page__body > :first-child,
.post__body > :first-child {
    margin-top: 0;
}

/* --- Post ---------------------------------------------------------------- */

.post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2125rem 1.3281rem;
    margin: 0 0 0.7969rem;
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
    line-height: 1.5;
}

.post__date,
.post__updated,
.post__author {
    color: var(--theme-color-text, #141414);
}

.post__series {
    margin: 0 0 0.6rem;
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
}

/* The author line: the label, then the mark and the name. */
.post-author {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}

.post-author__mark,
.home-about__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border: 1px solid var(--theme-color-text, #141414);
    border-radius: 50%;
    color: var(--theme-color-text, #141414);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
}

.post-author__mark {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.65rem;
}

/* facts: a small list of figures, under hairlines */
.post-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.75rem 1.5rem;
    max-width: var(--theme-size-measure, 38.25rem);
    margin: 0 0 calc(var(--theme-size-space, 1.5rem) * 1.5);
    padding: 0.8rem 0;
    border-top: 1px solid var(--theme-color-border, #e4e4e2);
    border-bottom: 1px solid var(--theme-color-border, #e4e4e2);
    font-size: 0.9031rem;
    line-height: 1.4;
}

.post-facts__label {
    color: var(--theme-color-muted, #676767);
}

.post-facts__value {
    margin: 0.15rem 0 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.post__media {
    margin-bottom: calc(var(--theme-size-space, 1.5rem) * 1.5);
}

.post__media:empty,
.post-card__media:empty {
    display: none;
}

.post__image,
.post-card__image {
    width: 100%;
    border-radius: var(--theme-size-radius, 0.375rem);
}

.post__footer {
    clear: both;
    margin-top: calc(var(--theme-size-space, 1.5rem) * 2.5);
}

/* The parts of the series under a post: numbers, titles, the current one
   in bold and not linked-looking. */
.post-series {
    margin-bottom: calc(var(--theme-size-space, 1.5rem) * 1.5);
    padding-top: var(--theme-size-space, 1.5rem);
    border-top: 1px solid var(--theme-color-border, #e4e4e2);
}

.post-series__title {
    margin: 0 0 0.75rem;
    font-size: 1.0625rem;
}

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

.post-series__item {
    display: flex;
    gap: 1rem;
    align-items: baseline;
}

.post-series__item > span {
    flex: none;
    min-width: 1.5rem;
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
    font-variant-numeric: tabular-nums;
}

.post-series__item--current > a {
    color: var(--theme-color-text, #141414);
    font-weight: 700;
    text-decoration: none;
}

.post__tags {
    margin-bottom: var(--theme-size-space, 1.5rem);
}

/* --- Post list (home) and post card --------------------------------------- */

.post-list {
    margin-top: calc(var(--theme-size-space, 1.5rem) * 3);
}

.post-list__title {
    margin: 0 0 var(--theme-size-space, 1.5rem);
    color: var(--theme-color-muted, #676767);
    font-size: 0.9563rem;
    font-weight: 400;
    letter-spacing: 0;
}

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

.post-list__item {
    margin: 0 0 calc(var(--theme-size-space, 1.5rem) * 1.75);
}

/* A card is one grid: the date first, then title and excerpt, the picture
   (if any) beside them. post-card__body only groups the text. */
.post-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.3188rem 1.5938rem;
}

.post-card__body {
    display: contents;
}

.post-card__meta {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0;
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
    font-variant-numeric: tabular-nums;
}

.post-card__title {
    grid-column: 1;
    margin: 0;
    font-size: 1.5938rem;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.post-card__link {
    color: var(--theme-color-text, #141414);
    text-decoration: none;
}

.post-card__link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.post-card__excerpt {
    grid-column: 1;
    margin: 0;
    color: var(--theme-color-muted, #676767);
    text-wrap: pretty;
}

.post-card__media {
    grid-column: 2;
    grid-row: 2 / span 2;
    width: 6.9063rem;
}

.post-card__image {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* The newest post on the home: the same row, larger, its picture across
   the column under the text. */
.post-card--featured .post-card__title {
    grid-column: 1 / -1;
    font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.post-card--featured .post-card__excerpt {
    grid-column: 1 / -1;
    color: var(--theme-color-text, #141414);
    font-size: 1.1688rem;
    line-height: 1.5;
}

.post-card--featured .post-card__media {
    grid-column: 1 / -1;
    grid-row: 4;
    width: auto;
    margin-top: 0.75rem;
}

.post-card--featured .post-card__image {
    aspect-ratio: 16 / 9;
}

.post-list__more,
.button {
    display: inline-block;
    color: var(--theme-color-accent, #000000);
    font-weight: 600;
}

.post-list__more::after,
.button::after {
    content: '\00a0\2192';
    content: '\00a0\2192' / '';
}

/* --- Home: series, highlight, about ------------------------------------- */

.home-series,
.home-highlight,
.home-about {
    margin-top: calc(var(--theme-size-space, 1.5rem) * 3);
    padding-top: var(--theme-size-space, 1.5rem);
    border-top: 1px solid var(--theme-color-border, #e4e4e2);
}

.home-series h2,
.home-highlight h2,
.home-about h2 {
    margin: 0 0 0.6rem;
    font-size: 1.4609rem;
}

.home-series p,
.home-about p:first-child {
    margin: 0 0 0.5rem;
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
}

.home-series ol {
    margin: 0.25rem 0 0;
    padding-left: 2.25rem;
    list-style: decimal-leading-zero;
}

.home-series li::marker {
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
    font-variant-numeric: tabular-nums;
}

/* the link to part one follows the list, on every width */
.home-series {
    display: flex;
    flex-direction: column;
}

.home-series > div {
    display: contents;
}

.home-series .button {
    order: 1;
    align-self: start;
    justify-self: start;
    margin-top: 1rem;
}

.home-highlight h2::before {
    content: '#';
    content: '#' / '';
    color: var(--theme-color-muted, #676767);
    font-weight: 400;
}

.home-highlight ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-highlight li {
    display: flex;
    flex-direction: column;
    margin: 0 0 0.6rem;
}

.home-highlight a {
    font-weight: 600;
    text-decoration: none;
}

.home-highlight a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.home-highlight time {
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
    font-variant-numeric: tabular-nums;
}

.home-about {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0 1.25rem;
}

.home-about__mark {
    width: 3rem;
    height: 3rem;
    font-size: 0.95rem;
}

.home-about p {
    margin: 0;
}

.home-about__links {
    grid-column: 2;
    margin-top: 0.75rem;
}

/* --- Archive ------------------------------------------------------------- */

.post-archive__year {
    margin-top: calc(var(--theme-size-space, 1.5rem) * 2);
}

.post-archive__year h2 {
    margin: 0 0 0.5313rem;
    color: var(--theme-color-muted, #676767);
    font-size: 0.9563rem;
    font-weight: 400;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

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

.post-archive__count {
    margin-left: 0.6em;
    font-size: 0.85em;
}

.post-archive__item {
    display: flex;
    flex-direction: column;
    margin: 0 0 0.9563rem;
}

.post-archive__item a {
    font-weight: 600;
    text-decoration: none;
}

.post-archive__item a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.post-archive__item time {
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
    font-variant-numeric: tabular-nums;
}

/* --- plugin-tags --------------------------------------------------------- */

.tag-links,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2656rem 1.1688rem;
    font-size: 0.9563rem;
}

.tag-cloud {
    margin-top: calc(var(--theme-size-space, 1.5rem) * 3);
    padding-top: var(--theme-size-space, 1.5rem);
    border-top: 1px solid var(--theme-color-border, #e4e4e2);
}

.tag-links__item,
.tag-cloud__item {
    color: var(--theme-color-muted, #676767);
    text-decoration: none;
}

.tag-links__item::before,
.tag-cloud__item::before {
    content: '#';
    content: '#' / '';
}

.tag-links__item:hover,
.tag-cloud__item:hover {
    color: var(--theme-color-text, #141414);
    text-decoration: underline;
}

.tag-overview__header {
    margin-bottom: calc(var(--theme-size-space, 1.5rem) * 2);
}

.tag-overview__title::before {
    content: '#';
    content: '#' / '';
    color: var(--theme-color-muted, #676767);
    font-weight: 400;
}

.tag-overview__image {
    width: 100%;
    margin-top: 1.0625rem;
    border-radius: var(--theme-size-radius, 0.375rem);
}

.tag-overview__content {
    margin: 0;
}

.tag-overview__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3188rem 0;
    margin: 0 0 calc(var(--theme-size-space, 1.5rem) * 1.75);
}

.tag-overview__item-title {
    margin: 0;
    font-size: 1.5938rem;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.tag-overview__item-date {
    grid-row: 1;
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
    font-variant-numeric: tabular-nums;
}

.tag-overview__item-description {
    margin: 0;
    color: var(--theme-color-muted, #676767);
}

.tag-overview__item-link {
    justify-self: start;
    font-size: 0.9563rem;
    font-weight: 600;
}

/* --- plugin-page-pagination: prev/next under a hairline ------------------- */

.page-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7969rem 2.125rem;
    padding-top: var(--theme-size-space, 1.5rem);
    border-top: 1px solid var(--theme-color-border, #e4e4e2);
    font-weight: 600;
    line-height: 1.35;
}

.page-pagination__link {
    flex: 1 1 12.75rem;
    text-decoration: none;
}

.page-pagination__link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.page-pagination__link--previous::before {
    content: '\2190\00a0';
    content: '\2190\00a0' / '';
}

.page-pagination__link--next {
    margin-left: auto;
    text-align: right;
}

.page-pagination__link--next::after {
    content: '\00a0\2192';
    content: '\00a0\2192' / '';
}

/* --- plugin-search: the site's own search page ------------------------- */

/* No colour of its own: the input has a hairline in the text colour (it is
   the control's only edge, so it needs 3:1, WCAG 1.4.11) and the global
   focus outline; the results read like the archive's rows. */
.search__input {
    display: block;
    width: 100%;
    padding: 0.6375rem 0.7969rem;
    background: var(--theme-color-bg, #ffffff);
    color: var(--theme-color-text, #141414);
    border: 1px solid var(--theme-color-text, #141414);
    border-radius: var(--theme-size-radius, 0.375rem);
    font: inherit;
    appearance: none;
}

.search__input::placeholder {
    color: var(--theme-color-muted, #676767);
    opacity: 1;
}

/* Safari's inset for the magnifier it no longer draws */
.search__input::-webkit-search-decoration {
    appearance: none;
}

/* the field's clear button: a cross in the text colour, not the browser's
   blue. Drawn from two gradients, so the file gains no url(). */
.search__input::-webkit-search-cancel-button {
    width: 0.875rem;
    height: 0.875rem;
    margin-left: 0.6375rem;
    background:
        linear-gradient(45deg, transparent calc(50% - 1px), var(--theme-color-text, #141414) calc(50% - 1px), var(--theme-color-text, #141414) calc(50% + 1px), transparent calc(50% + 1px)),
        linear-gradient(-45deg, transparent calc(50% - 1px), var(--theme-color-text, #141414) calc(50% - 1px), var(--theme-color-text, #141414) calc(50% + 1px), transparent calc(50% + 1px));
    cursor: pointer;
    appearance: none;
}

/* before typing and without a match the list takes no space */
.search__results {
    margin: calc(var(--theme-size-space, 1.5rem) * 1.5) 0 0;
    padding: 0;
    list-style: none;
}

.search__results:empty {
    display: none;
}

.search__item {
    margin: 0 0 0.9563rem;
}

.search__item + .search__item {
    margin-top: 0;
}

.search__link {
    font-weight: 600;
    text-decoration: none;
}

.search__link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.search__description {
    margin: 0.2656rem 0 0;
    color: var(--theme-color-muted, #676767);
    font-size: 0.9563rem;
}

/* a match: the text colour and bold, no background */
.search__highlight {
    color: var(--theme-color-text, #141414);
    font-weight: 600;
}

/* search.js keeps the message in the DOM, hidden and empty, while there are
   hits; its margin applies only while it says something */
.search__empty {
    margin: calc(var(--theme-size-space, 1.5rem) * 1.5) 0 0;
    color: var(--theme-color-muted, #676767);
}

.search__empty:empty {
    display: none;
}

/* --- plugin-code-blocks: the theme's tokens on its custom properties ----- */

.nera-code-scope,
.nera-code {
    --nera-code-bg: var(--theme-color-bg, #ffffff);
    --nera-code-ink: var(--theme-color-text, #141414);
    --nera-code-muted: var(--theme-color-muted, #676767);
    --nera-code-accent: var(--theme-color-accent, #000000);
    --nera-code-line: var(--theme-color-border, #e4e4e2);
    --nera-code-font: var(--theme-font-mono, ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace);
    --nera-code-radius: var(--theme-size-radius, 0.375rem);
}

/* --- plugin-images: Markdown images -------------------------------------- */

.nera-image {
    margin: calc(var(--theme-size-space, 1.5rem) * 1.5) 0;
}

.nera-image img {
    width: 100%;
    border-radius: var(--theme-size-radius, 0.375rem);
}

.nera-image__caption {
    margin-top: 0.6375rem;
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
    color: var(--theme-color-muted, #676767);
    font-size: 0.9031rem;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5313rem 1.5938rem;
    max-width: calc(var(--theme-size-width, 50rem) + 3rem);
    margin: 0 auto;
    padding: 0 1.5938rem 2.6563rem;
}

.site-footer__inner::before {
    content: '';
    flex: 0 0 100%;
    margin-bottom: 1.0625rem;
    border-top: 1px solid var(--theme-color-border, #e4e4e2);
}

.site-footer a {
    color: var(--theme-color-muted, #676767);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--theme-color-text, #141414);
    text-decoration: underline;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2656rem 1.3281rem;
}

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

/* plugin-social-media-links, through the footer-extra seam */
.site-footer .social-media-links__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2656rem 1.3281rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer .social-media-links,
.site-footer .social-media-links__item {
    margin: 0;
}

.site-footer .social-media-links__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

.site-footer .social-media-links__icon {
    display: inline-flex;
    width: 1em;
    height: 1em;
}

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

.site-footer .social-media-links__label {
    white-space: nowrap;
}

/* --- Wide screens: dates and years move into the margin ------------------- */

@media (min-width: 48rem) {
    .page__header,
    .page__body,
    .post-list__title,
    .post-list__more,
    .post__header,
    .post__media,
    .post__body,
    .post__footer,
    .tag-cloud,
    .tag-overview__header,
    .search {
        margin-left: calc(var(--theme-size-width, 50rem) - var(--theme-size-measure, 38.25rem));
    }

    .post__header {
        position: relative;
        max-width: var(--theme-size-measure, 38.25rem);
    }

    .post__meta {
        position: absolute;
        top: 0.9563rem;
        right: 100%;
        flex-direction: column;
        width: calc(var(--theme-size-width, 50rem) - var(--theme-size-measure, 38.25rem));
        margin: 0;
        padding-right: 1.5938rem;
    }

    .post__meta time,
    .post__meta .post__author {
        display: block;
        white-space: nowrap;
    }

    .post-card,
    .tag-overview__item {
        grid-template-columns: calc(var(--theme-size-width, 50rem) - var(--theme-size-measure, 38.25rem)) minmax(0, var(--theme-size-measure, 38.25rem));
        gap: 0.3719rem 0;
    }

    .post-card:has(> .post-card__media) {
        grid-template-columns: calc(var(--theme-size-width, 50rem) - var(--theme-size-measure, 38.25rem)) minmax(0, 1fr) auto;
    }

    .post-card__meta,
    .tag-overview__item-date {
        grid-column: 1;
        grid-row: 1;
        padding: 0.5313rem 1.5938rem 0 0;
        white-space: nowrap;
    }

    .post-card__title,
    .post-card__excerpt,
    .tag-overview__item-title,
    .tag-overview__item-description,
    .tag-overview__item-link {
        grid-column: 2;
    }

    .post-card__media {
        grid-column: 3;
        grid-row: 1 / span 2;
        margin-left: 1.5938rem;
    }

    .post-card--featured,
    .post-card--featured:has(> .post-card__media) {
        grid-template-columns: calc(var(--theme-size-width, 50rem) - var(--theme-size-measure, 38.25rem)) minmax(0, var(--theme-size-measure, 38.25rem));
    }

    .post-card--featured .post-card__meta {
        padding-top: 0.9rem;
    }

    .post-card--featured .post-card__title,
    .post-card--featured .post-card__excerpt,
    .post-card--featured .post-card__media {
        grid-column: 2;
    }

    .post-card--featured .post-card__media {
        grid-row: 3;
        margin-left: 0;
    }

    /* series, highlight and about: their label or mark in the margin */
    .home-series,
    .home-highlight,
    .home-about {
        display: grid;
        grid-template-columns: calc(var(--theme-size-width, 50rem) - var(--theme-size-measure, 38.25rem)) minmax(0, var(--theme-size-measure, 38.25rem));
        margin-left: 0;
        padding-top: calc(var(--theme-size-space, 1.5rem) * 1.25);
        border-top: 0;
        background: linear-gradient(var(--theme-color-border, #e4e4e2), var(--theme-color-border, #e4e4e2)) no-repeat right top / var(--theme-size-measure, 38.25rem) 1px;
    }

    .home-series .button {
        grid-row: 3;
    }

    .home-series p {
        grid-column: 1;
        grid-row: 1;
        padding: 0.35rem 1.5938rem 0 0;
    }

    .home-series h2,
    .home-series ol,
    .home-series .button,
    .home-highlight h2,
    .home-highlight ul,
    .home-about > div,
    .home-about__links {
        grid-column: 2;
    }

    .home-series ol {
        grid-row: 2;
    }

    .home-highlight h2 {
        grid-row: 1;
    }

    .home-highlight ul {
        display: contents;
    }

    .home-highlight li {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: subgrid;
        align-items: baseline;
    }

    .home-highlight time {
        grid-column: 1;
        grid-row: 1;
        padding-right: 1.5938rem;
        white-space: nowrap;
    }

    .home-highlight a {
        grid-column: 2;
    }

    .home-about {
        gap: 0;
    }

    .home-about__mark {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    /* the post's author line and facts sit in the margin */
    .post-author {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.2rem 0.5rem;
        align-items: center;
    }

    .post-author__mark {
        grid-row: 2;
        grid-column: 1;
    }

    .post-author__name {
        grid-row: 2;
        grid-column: 2;
    }

    .post__meta .post-author__name {
        white-space: normal;
    }

    .post-facts {
        float: left;
        grid-template-columns: minmax(0, 1fr);
        width: calc(var(--theme-size-width, 50rem) - var(--theme-size-measure, 38.25rem));
        margin: 0;
        padding: 0 1.5938rem 0 0;
        border: 0;
    }

    .post-facts__item + .post-facts__item {
        padding-top: 0.75rem;
        border-top: 1px solid var(--theme-color-border, #e4e4e2);
    }

    .post-series__item > span {
        min-width: 2rem;
    }

    .post-archive__year {
        display: grid;
        grid-template-columns: calc(var(--theme-size-width, 50rem) - var(--theme-size-measure, 38.25rem)) minmax(0, var(--theme-size-measure, 38.25rem));
    }

    .post-archive__year h2 {
        margin: 0;
        padding-top: 0.1063rem;
        line-height: 1.65;
    }

    .post-archive__count {
        display: block;
        margin-left: 0;
        line-height: 1.4;
    }

    .post-archive__item {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        gap: 1.5938rem;
    }

    .post-archive__item time {
        order: 1;
        flex: none;
    }
}

/* --- Motion: only for visitors who have not asked for less --------------- */

@media (prefers-reduced-motion: no-preference) {
    a {
        transition: color 0.15s ease, text-decoration-color 0.15s ease;
    }
}

/* --- Links that open a new tab (§S11.5) ---------------------------------- */

/* The site opens external links in a new tab (plugin-link-attributes,
   plugin-social-media-links); the theme sets no target, it only marks it. */
a[target='_blank']::after {
    content: '\00a0\2197';
    display: inline-block;
    text-decoration: none;
}
