:root {
  color-scheme: dark;
  --page-width: 1180px;
  --text: #edf3ee;
  --muted: #b6c6bd;
  --paper: #060A07;
  --brand-ink: #060A07;
  --card-text: #1f1f1f;
  --card-muted: #6f6f6f;
  --surface: #101c15;
  --surface-raised: #18251d;
  --surface-hover: #20382c;
  --border: rgba(237, 243, 238, 0.18);
  --border-strong: rgba(237, 243, 238, 0.32);
  --accent: #8aaf9b;
  --accent-soft: #b8d2c2;
  --accent-contrast: #060a07;
  --focus: #b8d2c2;
  --shadow: rgba(0, 0, 0, 0.18);
  --card: #f4f6f3;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --text: #1d2b22;
    --muted: #53655a;
    --paper: #f4f7f4;
    --brand-ink: #f4f7f4;
    --card-text: #1f1f1f;
    --card-muted: #59675e;
    --surface: #ffffff;
    --surface-raised: #e9efea;
    --surface-hover: #dfe9e1;
    --border: rgba(29, 58, 40, 0.16);
    --border-strong: rgba(29, 58, 40, 0.3);
    --accent: #355f46;
    --accent-soft: #315840;
    --accent-contrast: #ffffff;
    --focus: #6b4e2f;
    --shadow: rgba(27, 45, 33, 0.12);
    --card: #ffffff;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --text: #1d2b22;
  --muted: #53655a;
  --paper: #f4f7f4;
  --brand-ink: #f4f7f4;
  --card-text: #1f1f1f;
  --card-muted: #59675e;
  --surface: #ffffff;
  --surface-raised: #e9efea;
  --surface-hover: #dfe9e1;
  --border: rgba(29, 58, 40, 0.16);
  --border-strong: rgba(29, 58, 40, 0.3);
  --accent: #355f46;
  --accent-soft: #315840;
  --accent-contrast: #ffffff;
  --focus: #6b4e2f;
  --shadow: rgba(27, 45, 33, 0.12);
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
}

/*
 * A viewport-sized background keeps the colours consistent on
 * short and long pages. Blur softens the solid SVG wave boundary.
 * Overscan prevents the blur from leaving visible edges.
 */

body::before {
  content: "";
  position: fixed;
  inset: -32px;
  z-index: -1;
  pointer-events: none;

  background-color: var(--paper);
  background-image: url("/images/backgrounds/bg01.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;

  filter: blur(24px);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body::before {
    background-image: none;
    filter: none;
  }
}

:root[data-theme="light"] body::before {
  background-image: none;
  filter: none;
}

a {
  color: inherit;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.6rem;
  inset-inline-start: 0.75rem;
  z-index: 5000;
  transform: translateY(calc(-100% - 1rem));
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--focus);
  border-radius: 0.45rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/*
 * Status bar
 */

.status-bar {
  width: 100%;
  background: var(--paper);
  color: var(--text);

  border-bottom: 1px solid var(--border);

  overflow-x: auto;
  scrollbar-width: thin;
}

.status-bar-inner {
  min-width: 100%;
  padding: 0.48rem 1.5rem;

  display: flex;
  align-items: center;
  gap: 1rem;

  white-space: nowrap;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  width: 58px;
  height: 58px;

  text-decoration: none;
}

.site-logo {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.site-logo-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 0.3rem;
}

.status-bar-meta {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-width: max-content;
  gap: 1.25rem;

  font-size: 0.9rem;
}

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

.moon-status:hover {
  text-decoration: underline;
}

.clock-group {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.clock-group strong {
  font-weight: 600;
}

.status-separator {
  color: var(--muted);
}


/*
 * Homepage hero
 */

.hero {
  position: relative;
  min-height: 62vh;

  background-size: cover;
  background-position: center;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  color: white;
  padding: 3rem 1.5rem;
}

.hero-inner {
  max-width: 900px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 1.5rem auto 0;
  max-width: 760px;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: rgba(255, 255, 255, 0.92);
}


/*
 * Hero navigation
 */

.hero-nav {
  position: absolute;
  inset-inline: 0;
  bottom: 1.25rem;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 1rem;
  padding: 0 1.5rem;
}

.hero-nav-left,
.hero-nav-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-lozenge {
  display: inline-block;
  padding: 0.35rem 0.8rem;

  border: 1px solid var(--border-strong);
  border-radius: 999px;

  background: var(--surface);
  color: var(--text);

  text-decoration: none;
  text-transform: lowercase;

  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: 0.01em;

  backdrop-filter: blur(3px);
}

.nav-lozenge:hover {
  background: var(--surface-hover);
}

.nav-lozenge-admin {
  opacity: 0.78;
}


/*
 * Recent posts and article pages
 */

.latest-posts {
  padding: 4rem 1.5rem 5rem;
}

.featured-posts {
  padding: 2.75rem 1.5rem 1rem;
}

.featured-posts h2 {
  margin: 0 0 1.25rem;
  font-size: 1.55rem;
}

.featured-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.25rem;
}

.featured-post-card {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 0.9rem;
  background: var(--surface);
  box-shadow: 0 12px 32px var(--shadow);
}

.featured-post-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 2.2 / 1;
  background: var(--surface-raised);
}

.featured-post-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-post-content {
  padding: 1.15rem 1.35rem 1.4rem;
}

.featured-post-label {
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.featured-post-content h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.3;
}

.featured-post-content h3 a {
  text-decoration: none;
}

.featured-post-content h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.featured-post-content .post-date {
  margin: 0.5rem 0;
}

.featured-post-content .post-summary > :last-child {
  margin-bottom: 0;
}

.content-wrap {
  width: min(100%, var(--page-width));
  margin: 0 auto;
}

.page-content {
  padding: 3rem 1.5rem 5rem;
  overflow-wrap: break-word;
}

.post-hero {
  width: 100vw;
  margin: 1.75rem calc(50% - 50vw) 2.5rem;
}

.post-hero img {
  display: block;
  width: 100%;
  height: clamp(16rem, 48vw, 42rem);
  object-fit: cover;
}

.post-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1rem 0 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--surface);
}

.post-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
  margin: 0;
}

.post-meta-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.45rem;
}

.post-meta-item dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.post-meta-item dd {
  margin: 0;
  font-size: 0.9rem;
}

.post-meta-item a {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 0.15em;
}

.post-meta-map-hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.post-meta-tags .post-tags-list {
  gap: 0.35rem;
}

.post-meta-tags .post-tag-chip {
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
}

.post-revision {
  margin: 2.25em 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.83rem;
  font-style: italic;
}

.latest-posts h2 {
  margin-top: 0;
  font-size: 2rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.post-card {
  background: var(--card);
  color: var(--card-text);

  padding: 1.5rem;
  border-radius: 0.75rem;

  box-shadow: 0 10px 30px var(--shadow);
}

.post-card h3 {
  margin-top: 0;
}

.post-card h3 a {
  text-decoration: none;
}

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

.post-date {
  color: var(--muted);
  font-size: 0.95rem;
}

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

/* Article neighbours and tag/series-based recommendations. */
.post-neighbor-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 3rem 0 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.post-neighbor-link {
  display: flex;
  min-width: 0;
  min-height: 5.25rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--surface);
  text-decoration: none;
}

.post-neighbor-link:hover {
  background: var(--surface-hover);
}

.post-neighbor-next {
  text-align: end;
  align-items: flex-end;
}

.post-neighbor-direction,
.related-post-card time {
  color: var(--muted);
  font-size: 0.78rem;
}

.post-neighbor-title {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.post-neighbor-link:focus-visible,
.related-post-card a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.related-posts {
  margin: 2rem 0 1rem;
}

.post-series {
  display: grid;
  gap: 0.65rem;
  margin: 0.75rem 0 1.5rem;
}

.post-series-item {
  padding: 0.75rem 1rem;
  border-inline-start: 3px solid var(--accent);
  border-radius: 0 0.55rem 0.55rem 0;
  background: var(--surface-raised);
}

.post-series-membership,
.post-series-navigation {
  margin: 0;
}

.post-series-membership {
  color: var(--muted);
  font-size: 0.9rem;
}

.post-series-membership a {
  color: var(--text);
  font-weight: 700;
}

.post-series-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

.post-series-navigation a {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 0.15em;
}

.series-archive-header {
  margin-bottom: 1.5rem;
}

.series-archive-eyebrow,
.series-archive-part {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.series-archive-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding-inline-start: 2rem;
}

.series-archive-list li {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}

.series-archive-list h2 {
  margin: 0.1rem 0 0.4rem;
  font-size: 1.3rem;
}

.series-archive-list p {
  margin: 0.25rem 0;
}

.series-archive-list a {
  color: var(--text);
}

.post-series a:focus-visible,
.series-archive a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.related-posts h2 {
  margin: 0 0 0.9rem;
  font-size: 1.35rem;
}

.related-post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-post-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--surface);
}

.related-post-card a {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.related-post-card time {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .post-neighbor-nav {
    gap: 0.6rem;
  }

  .post-neighbor-link {
    padding: 0.7rem;
  }
}


/*
 * Article photographs
 */

.mgs-photo {
  width: min(42%, 420px);
  margin-top: 0.35rem;
  margin-bottom: 1.25rem;
}

.mgs-photo-left {
  float: inline-start;
  margin-inline-end: 1.5rem;
  margin-inline-start: 0;
}

.mgs-photo-right {
  float: inline-end;
  margin-inline-end: 0;
  margin-inline-start: 1.5rem;
}

/* Full-width images inserted with gzin; no floating, caption below. */
.mgs-photo-center,
.page-content .mgs-photo-center {
  float: none;
  clear: both;
  width: 100%;
  max-width: 760px;
  margin: 1.25rem auto 1.5rem;
}

.mgs-photo-center figcaption {
  text-align: center;
}

.mgs-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
}

.mgs-photo figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.page-content::after {
  content: "";
  display: table;
  clear: both;
}


/*
 * Footer
 */

.site-footer {
  background: transparent;
  color: var(--muted);
}

.site-footer-inner {
  min-height: 4rem;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 1rem 2rem;

  font-size: 0.82rem;
  white-space: nowrap;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

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

.footer-tagline {
  font-style: italic;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.footer-theme {
  font-weight: 600;
}

.privacy-settings-button {
  border: 1px solid var(--muted);
  border-radius: 0.35rem;
  padding: 0.55rem 0.8rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.privacy-settings-button:hover {
  border-color: var(--accent);
}

.privacy-settings-status {
  min-height: 1.5em;
  color: var(--muted);
  font-size: 0.9rem;
}


/*
 * Pull quotes
 */

.pull-quote {
  margin: 2.5rem 0;
  padding-block: 1.25rem;
  padding-inline: 1.5rem 0;

  border-inline-start: 4px solid var(--accent);
  color: var(--text);

  font-size: clamp(1.10rem, 1.8vw, 1.5rem);
  font-style: italic;
  line-height: 1.4;
}

.pull-quote p {
  margin: 0;
}

.pull-quote cite {
  display: block;
  margin-top: 0.75rem;
  color: var(--muted);

  font-size: 0.85rem;
  font-style: normal;
  font-weight: 600;
}


/*
 * Branded 404 page
 */

.error-404 {
  min-height: 70vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 4rem 1.5rem;
  text-align: center;
}

.error-404-inner {
  width: min(100%, 640px);
}

.error-404-logo {
  display: block;
  width: clamp(104px, 16vw, 148px);
  height: auto;
  margin: 0 auto 1.75rem;
}

.error-404-code {
  margin: 0 0 0.35rem;
  color: var(--muted);

  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.error-404 h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.error-404-message {
  margin: 1.35rem auto 0;
  max-width: 520px;

  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.error-404-home {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.55rem 1rem;

  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);

  text-decoration: none;
  text-transform: lowercase;

  font-size: 0.9rem;
  font-weight: 600;
}

.error-404-home:hover {
  background: var(--text);
  color: var(--paper);
}

.error-404-home:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}


/*
 * Mobile
 *
 * The status bar deliberately does NOT wrap.
 * On narrow displays it scrolls horizontally.
 */

@media (max-width: 800px) {
  .status-bar-inner {
    padding: 0.45rem 0.9rem;
    gap: 0.75rem;
  }

  .site-logo-link {
    width: 48px;
    height: 48px;
  }

  .site-logo {
    width: 44px;
    height: 44px;
  }

  .status-bar-meta {
    justify-content: flex-start;
    gap: 0.85rem;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 55vh;
  }

  .hero-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.2rem;
  }

  .hero-nav-left,
  .hero-nav-right {
    flex-shrink: 0;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .mgs-photo,
  .mgs-photo-left,
  .mgs-photo-right {
    float: none;
    width: 100%;
    max-width: none;
    margin: 1.5rem 0;
  }

  .site-footer-inner {
    padding: 1rem 1.25rem;
  }

  .footer-right {
    gap: 1.5rem;
  }
}

/*
 * Tags and taxonomy pages
 */

.taxonomy-page {
  padding: 3rem 1.5rem 5rem;
}

.taxonomy-header {
  margin-bottom: 2rem;
}

.taxonomy-header h1 {
  margin: 0.75rem 0;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.1;
}

.taxonomy-header p,
.taxonomy-count {
  color: var(--muted);
}

.taxonomy-back {
  display: inline-block;
  text-decoration: none;
}

.taxonomy-back:hover {
  text-decoration: underline;
}

.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;

  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.taxonomy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  height: 100%;
  padding: 1.2rem 1.4rem;

  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  color: var(--text);

  text-decoration: none;
}

.taxonomy-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
}

.taxonomy-name {
  font-size: 1.15rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.taxonomy-post-count {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.taxonomy-empty {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
}

.taxonomy-empty h2 {
  margin-top: 0;
}

.taxonomy-card:focus-visible,
.taxonomy-back:focus-visible,
.taxonomy-empty a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* Optional editorial tag cloud. Frequency changes typography, never visibility. */
.tag-heatmap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: clamp(1rem, 3.3vw, 2.4rem);
  row-gap: clamp(0.9rem, 2.8vw, 1.8rem);
  max-width: 62rem;
  margin: 2.5rem auto 0;
  padding: 0.5rem 0 1rem;
  list-style: none;
}

.tag-heatmap li {
  max-width: 100%;
}

.tag-heatmap-link {
  display: inline;
  max-width: 100%;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 620;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.22em;
  overflow-wrap: anywhere;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

.tag-heatmap-level-equal {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 650;
}

.tag-heatmap-level-low {
  color: var(--text);
  font-size: 1rem;
  font-weight: 550;
}

.tag-heatmap-level-medium {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 620;
}

.tag-heatmap-level-high {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
}

.tag-heatmap-level-highest {
  color: var(--accent-soft);
  font-size: 1.75rem;
  font-weight: 760;
}

.tag-heatmap-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.tag-heatmap-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.tag-heatmap-count {
  color: var(--muted);
  margin-inline-start: 0.16em;
  font-family: system-ui, sans-serif;
  font-size: 0.62em;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  vertical-align: super;
}

@media (max-width: 520px) {
  .tag-heatmap {
    column-gap: 0.9rem;
    row-gap: 0.8rem;
    justify-content: center;
    padding-inline: 0.2rem;
  }

  .tag-heatmap-level-equal {
    font-size: 1.2rem;
  }

  .tag-heatmap-level-high {
    font-size: 1.28rem;
  }

  .tag-heatmap-level-highest {
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tag-heatmap-link {
    transition: none;
  }
}

/* Compact tag chips. */

.taxonomy-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.taxonomy-card {
  gap: 0.65rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.taxonomy-name {
  font-size: 0.9rem;
}

.taxonomy-post-count {
  font-size: 0.75rem;
}

/* Tag chips on individual posts. */

.post-tags {
  margin: 0.75rem 0 1.5rem;
}

.post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-tag-chip {
  display: inline-block;
  max-width: 100%;
  padding: 0.35rem 0.75rem;

  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);

  font-size: 0.85rem;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.post-tags-list li {
  max-width: 100%;
}

/* Year and month article archive. */
.article-archive-header {
  margin-bottom: 2.5rem;
}

.article-archive-years {
  display: grid;
  gap: 2rem;
}

.article-archive-year {
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
}

.article-archive-year h2 {
  margin: 0 0 1.25rem;
  color: var(--accent-soft);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.article-archive-month + .article-archive-month {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.article-archive-month h3 {
  margin: 0 0 0.6rem;
  color: var(--text);
  font-size: 1.1rem;
}

.article-archive-month ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-archive-month li {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr);
  gap: 0.8rem;
}

.article-archive-month time {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.article-archive-month a {
  color: var(--text);
  overflow-wrap: anywhere;
}

.article-archive-month a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.article-archive-empty {
  color: var(--muted);
}

.post-tag-chip:hover {
  background: var(--surface-hover);
}

.post-tag-chip:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* Larger alternating photographs, with each float starting below the last. */
@media (min-width: 801px) {
  .page-content .mgs-photo {
    width: 65%;
    max-width: none;
    clear: both;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }
}

/* Full-width, centred photographs with captions. */
.page-content figure.mgs-photo.mgs-photo-center {
  float: none;
  clear: both;
  width: 100%;
  max-width: none;
  margin: 1.5rem auto;
}
.page-content figure.mgs-photo.mgs-photo-center figcaption {
  text-align: center;
}

/* A quiet, non-animated reading indicator for long articles. */
.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: 3px;
  pointer-events: none;
}

.reading-progress[hidden] {
  display: none;
}

.reading-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  animation: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress-bar {
    animation: none;
    transition: none;
  }
}
