/* =========================
   Fonts
   ========================= */

@font-face {
  font-family: "URW Gothic Demi";
  src: url("/fonts/URWGothic-Demi.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "00 Hypertext";
  src: url("/fonts/00HypertextDisplayNon-Commercial-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================
   Variables
   ========================= */

:root {
  --bg: #181617;
  --text: #f4ede4;
  --hover: #be0f34;

  --muted: rgba(244, 237, 228, 0.55);
  --line: rgba(244, 237, 228, 0.22);




  /* Layout tuning */
  --header-pad-x: 32px;
  --header-pad-y: 24px;
  --header-h: 110px;     /* FIX: enforce header height */
  --logo-h: 90px;        /* FIX: single source of truth for logo height */
  --hover-img-w: min(900px, 49vw);
  --main-pad-top: 48px; /* current main top padding */
}

/* =========================
   Base
   ========================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: "URW Gothic Demi", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

/* =========================
   Header (logo left, icons pinned top-right)
   ========================= */

.site-header {
  position: relative; /* was fixed */
  z-index: 100;

  /* Keep logo aligned left */
  display: flex;
  align-items: flex-start;

  padding: var(--header-pad-y) var(--header-pad-x);

  background: linear-gradient(
    to bottom,
    rgba(24, 22, 23, 0.9),
    rgba(24, 22, 23, 0)
  );
}

.site-header,
.site-header a {
  color: var(--text);
}

/* Ensure the icon glyph always inherits the link colour (hover/active) */
.icon-btn .material-symbols-outlined {
  color: currentColor;
}

/* If logo is SVG inline */
.site-header svg {
  fill: currentColor;
}

/* FIX: prevent “any header img” rules from ever blowing up */
.site-header img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Logo */
.site-logo {
  display: inline-flex;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
}

/* FIX: hard-cap logo size */
.site-logo img {
  height: var(--logo-h);
  max-height: var(--logo-h);
  width: auto;
}

/* Logo swap (default = normal, a11y = inverted) */
.site-logo .logo-a11y {
  display: none;
}

body.a11y .site-logo .logo-normal {
  display: none;
}

body.a11y .site-logo .logo-a11y {
  display: block;
}
/* FIX: icons pinned to absolute top-right (won’t drift if header changes) */
.header-actions {
  position: absolute;
  top: var(--header-pad-y);
  right: var(--header-pad-x);

  display: flex;
  gap: 16px;
  align-items: center;
}

/* Icon link buttons (white, red on hover, red when active) */
.icon-btn {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.icon-btn:hover {
  color: var(--hover);
}

.icon-btn.is-active {
  color: var(--hover);
}

/* Material icons inherit currentColor */
.material-symbols-outlined {
  font-size: 24px;
  cursor: pointer;
  user-select: none;
  color: currentColor;
}

.site-footer {
  position: fixed;
  right: var(--header-pad-x);
  bottom: 18px;

  font-family: "00 Hypertext", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text);
  opacity: 0.85;

  z-index: 50;
  pointer-events: none;
}


/* =========================
   Layout
   ========================= */

main {
  padding: var(--main-pad-top) var(--header-pad-x) 64px;
}

/* =========================
   Homepage list
   ========================= */

.post-list {
  /* FULL WIDTH ALWAYS (no reserving space for hover image) */
  width: 100%;
  margin-top: 18px; /* tweak 10–30px */
  max-width: none;
  position: relative;
  z-index: 20; /* keep ABOVE hover image */
}

/* IMPORTANT: remove the “stop before the hover image” behaviour */
.has-hover-preview .post-list {
  max-width: none;
}

.post-item {
  display: block;
  width: 100%;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 28px;
}

.post-item:hover .post-title {
  color: var(--hover);
}

.post-title {
  display: block;
  width: 100%;
  max-width: none;

  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.nowrap {
  display: inline-flex;
  gap: 10px;
  white-space: nowrap;
  align-items: flex-start;
}

/* ===== Homepage date: match post meta sizing ===== */

.post-date {
  font-family: "00 Hypertext", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.40em;      /* match post page */
  letter-spacing: -0.02em;
  line-height: 1;
  margin-left: 0;
  opacity: 0.9;
  position: relative;
  top: 0.06em;           /* same cap-height alignment */
}

/* =========================
   Fixed hover image
   ========================= */

#hover-preview {
  position: fixed;

  /* Slightly higher than the first title */
  top: 135px;

  /* Match the same padding used by text */
  right: var(--header-pad-x);

  /* Tune size here */
  width: min(900px, 49vw);
  aspect-ratio: 4 / 3;

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

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;

  z-index: 5; /* ensure it sits UNDER the text */
}

#hover-preview.is-visible {
  opacity: 0.8;
}

/* =========================
   Search page (typed line, no box)
   ========================= */

.search-page {
  max-width: none;
  width: 100%; 
}

.search-line {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;

  margin-top: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.search-inline-icon {
  font-size: 24px;
  opacity: 0.95;
  color: var(--text);
}

/* FIX: your CSS was broken here (duplicate selector + missing closing brace).
   Keeping your intended styling, but valid. */
.search-input {
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);

  font-family: "neue-haas-grotesk-text", sans-serif;
  font-weight: 700;

  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;

  padding: 0;
  margin: 0;
  width: 100%;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-meta {
  margin-top: 14px;
  font-family: "00 Hypertext", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.search-results {
  margin-top: 40px;
  width: 100%;
}

/* =========================
   Post page
   ========================= */

/* Shared centred column for post content */
:root {
  --post-w: 900px; /* tweak if you want narrower/wider */
  --cap-w: 150px;  /* caption column width */
  --gap: 18px;
}

/* One true centred column */
.post {
  width: min(var(--post-w), 100%);
  margin: 18px auto 0;
}

/* Everything in the post uses the same width and alignment */
.post-header,
.post-body,
.post-nav {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Title matches homepage titles */
.post-header {
  max-width: none;
}

.post-header h1,
.post-title {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Inline “last word + meta” behaviour like homepage */
.post-title .nowrap {
  display: inline-flex;
  gap: 10px;
  white-space: nowrap;
  align-items: flex-start;
}

/* Date + author block stacked */
.post-meta-inline {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  margin-left: 0.35em;
  font-family: "00 Hypertext", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.40em;
  line-height: 1;
  letter-spacing: -0.02em;
  vertical-align: top;
  position: relative;
  top: 0.06em;
}

.post-meta-inline .post-date,
.post-meta-inline .post-author {
  display: block;
  font-size: 1em;
  line-height: 1;
  opacity: 0.9;
}

.post-author {
  opacity: 0.95;
}

/* =========================
   Featured image + caption
   Caption sits OUTSIDE LEFT of the post column,
   image stays EXACTLY the post column width,
   caption bottom aligns to image bottom.
   ========================= */

.post-featured.figure--inline {
  position: relative;
  width: 100%;
  margin: 28px 0 0;
}

.post-featured .figure__img {
  width: 100%;
  height: auto;
  display: block;
}

.post-featured .figure__cap {
  position: absolute;
  left: calc(-1 * (var(--cap-w) + var(--gap)));
  bottom: 0; /* bottom-align caption to image bottom */

  width: var(--cap-w);
  margin: 0;

  text-align: right;
  font-family: system-ui, sans-serif;
  font-size: 0.85em; /* slightly smaller than body */
  line-height: 1.3;
  opacity: 0.85;
}

/* =========================
   Post excerpt (subheading)
   ========================= */

.post-excerpt {
  margin-top: 28px;
  margin-bottom: 0px;

  font-family: "neue-haas-grotesk-text", sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem); /* same vibe as About heading */
  line-height: 1.2;
  letter-spacing: -0.01em;

  color: var(--text);
  opacity: 1;
}


/* =========================
   Body text
   ========================= */

.post-body {
  margin-top: 28px;
  font-family: system-ui, sans-serif;
  line-height: 1.9;
}

/* =========================
   Body figures + captions
   Caption sits OUTSIDE LEFT of the post column,
   image stays EXACTLY the post column width,
   caption bottom aligns to image bottom.
   ========================= */

.figure.figure--inline {
  position: relative;
  width: 100%;
  margin: 28px 0;
}

.figure__img {
  width: 100%;
  height: auto;
  display: block;
}

.figure__cap {
  position: absolute;
  left: calc(-1 * (var(--cap-w) + var(--gap)));
  bottom: 0; /* bottom-align caption to image bottom */

  width: var(--cap-w);
  margin: 0;

  text-align: right;
  font-family: system-ui, sans-serif;
  font-size: 0.85em; /* slightly smaller than body */
  line-height: 1.3;
  opacity: 0.85;
}

/* =========================
   Prev/Next links
   ========================= */

.post-nav {
  display: flex;
  gap: 24px;
  margin-top: 80px;
}

.post-nav-link {
  font-family: "neue-haas-grotesk-text", sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}

.post-nav-link:hover {
  color: var(--hover);
}

/* Force alignment even when only one link exists */
.post-nav-link--prev {
  margin-right: auto;
}

.post-nav-link--next {
  margin-left: auto;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 900px) {
  .post-title .nowrap {
    display: inline;
    white-space: normal;
  }

  .post-meta-inline {
    top: -0.1em;
    font-size: 0.4em;
  }

  /* On mobile, stack caption under image (inside column) */
  .post-featured .figure__cap,
  .figure__cap {
    position: static;
    width: auto;
    margin-top: 10px;
    text-align: left;
  }
}

/* =========================
   About page
   ========================= */

.about {
  max-width: 700px;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}

.about h1 {
  font-family: "neue-haas-grotesk-text", sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {
  :root {
    --header-pad-x: 20px;
    --header-h: 100px;
    --logo-h: 70px;
  }

  #hover-preview {
    display: none;
  }

  .post-title {
    font-size: 2.2rem;
    letter-spacing: -0.01em;
  }

  .nowrap {
    display: inline;
    white-space: normal;
  }

  .post-date {
    top: -0.1em;
    font-size: 0.4em;
  }

  .search-line {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .post-title {
    font-size: 2rem;
  }
}


/* Normal mode: mobile homepage/search title should match post page title sizing */
@media (max-width: 900px) {
  .post-list .post-title,
  #searchResults .post-title {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
  }
}

/* Normal mode: on mobile, keep last-word + date as inline-flex so date can top-align */
@media (max-width: 900px) {
  .post-list .nowrap,
  #searchResults .nowrap {
    display: inline-flex;     /* bring flex back */
    flex-wrap: wrap;          /* allow wrap on small screens */
    align-items: flex-start;  /* top-align date with word */
    gap: 10px;
    white-space: normal;
  }

  .post-list .post-date,
  #searchResults .post-date {
    display: inline-block;
    vertical-align: top;
    top: 0;              /* keep your desktop cap-height vibe */
  }
}

/* Mobile: footer should be at bottom of page, not fixed */
@media (max-width: 900px) {
  .site-footer {
    position: relative;
    right: auto;
    bottom: auto;
     top: -10px;
    margin-top: auto;
    padding-bottom: 18px;
        /* NEW */
    width: 100%;
    text-align: center;
  }

  body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  main {
    flex: 1;
  }
}

/* =========================================
   Accessibility mode overrides
   (paste at END of site.css)
   ========================================= */

/* Match whichever hook your JS uses */
html.a11y,
body.a11y,
html.accessibility,
body.accessibility,
html[data-a11y="1"],
body[data-a11y="1"] {
  --bg: #ffffff;
  --text: #000000;
  --muted: rgba(0, 0, 0, 0.75);
  --line: rgba(0, 0, 0, 0.25);

  /* classic link blue + highlight yellow */
  --a11y-blue: #0000ee;
  --a11y-yellow: #ffeb3b;

    --main-pad-top: 48px; /* match normal mode */
}

/* Kill any lingering dark areas / gradients everywhere */
html.a11y,
body.a11y,
html.accessibility,
body.accessibility,
html[data-a11y="1"],
body[data-a11y="1"] {
  background: #fff !important;
  color: #000 !important;
}

html.a11y body,
body.a11y,
html.accessibility body,
body.accessibility,
html[data-a11y="1"] body,
body[data-a11y="1"] {
  background: #fff !important;
  color: #000 !important;
}

/* Prevent dark html background showing through on short pages */
body.a11y,
body.accessibility,
body[data-a11y="1"] {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.a11y main,
body.accessibility main,
body[data-a11y="1"] main {
  flex: 1;
  background: #fff !important;
}

/* Header gradient -> plain white */
html.a11y .site-header,
body.a11y .site-header,
html.accessibility .site-header,
body.accessibility .site-header,
html[data-a11y="1"] .site-header,
body[data-a11y="1"] .site-header {
  background: #fff !important;
}

/* Hide hover-preview entirely in a11y mode */
html.a11y #hover-preview,
body.a11y #hover-preview,
html.accessibility #hover-preview,
body.accessibility #hover-preview,
html[data-a11y="1"] #hover-preview,
body[data-a11y="1"] #hover-preview {
  display: none !important;
}

/* -----------------------------------------
   Logo swap (CSS-only)
   ----------------------------------------- */
.site-logo .logo-a11y { display: none; }

body.a11y .site-logo .logo-normal,
body.accessibility .site-logo .logo-normal,
body[data-a11y="1"] .site-logo .logo-normal {
  display: none !important;
}

body.a11y .site-logo .logo-a11y,
body.accessibility .site-logo .logo-a11y,
body[data-a11y="1"] .site-logo .logo-a11y {
  display: block !important;
}

/* -----------------------------------------
   Icons (a11y): match normal spacing, keep yellow highlight, add blue underline
   ----------------------------------------- */
html.a11y .icon-btn,
body.a11y .icon-btn,
html.accessibility .icon-btn,
body.accessibility .icon-btn,
html[data-a11y="1"] .icon-btn,
body[data-a11y="1"] .icon-btn {
  color: #000 !important;

  /* KEY FIX: remove padding so buttons don't push apart */
  padding: 0 !important;
  margin: 0 !important;

  border-radius: 0 !important;
  box-sizing: border-box;

  background: transparent !important;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none !important;
}

/* Yellow highlight "padding" lives on a pseudo-element so it DOESN'T affect spacing */
html.a11y .icon-btn::before,
body.a11y .icon-btn::before,
html.accessibility .icon-btn::before,
body.accessibility .icon-btn::before,
html[data-a11y="1"] .icon-btn::before,
body[data-a11y="1"] .icon-btn::before {
  content: "";
  position: absolute;

  /* visual padding (tweak if you want more/less yellow) */
  inset: -2px -4px;

  background: transparent;
  z-index: -1;
}

/* Blue underline to show they're links (always visible in a11y mode) */
html.a11y .icon-btn::after,
body.a11y .icon-btn::after,
html.accessibility .icon-btn::after,
body.accessibility .icon-btn::after,
html[data-a11y="1"] .icon-btn::after,
body[data-a11y="1"] .icon-btn::after {
  content: "";
  position: absolute;

  left: -4px;
  right: -4px;
  bottom: -6px;

  height: 3px;
  background: var(--a11y-blue);
  pointer-events: none;
}

/* Hover/active highlight (underline stays) */
html.a11y .icon-btn:hover::before,
body.a11y .icon-btn:hover::before,
html.accessibility .icon-btn:hover::before,
body.accessibility .icon-btn:hover::before,
html[data-a11y="1"] .icon-btn:hover::before,
body[data-a11y="1"] .icon-btn:hover::before,
html.a11y .icon-btn.is-active::before,
body.a11y .icon-btn.is-active::before,
html.accessibility .icon-btn.is-active::before,
body.accessibility .icon-btn.is-active::before,
html[data-a11y="1"] .icon-btn.is-active::before,
body[data-a11y="1"] .icon-btn.is-active::before {
  background: var(--a11y-yellow) !important;
}

/* -----------------------------------------
   Titles: typography on container, underline/highlight on WORDS ONLY
   ----------------------------------------- */
html.a11y .post-title,
body.a11y .post-title,
html.accessibility .post-title,
body.accessibility .post-title,
html[data-a11y="1"] .post-title,
body[data-a11y="1"] .post-title {
  color: #000 !important;
  font-family: "neue-haas-grotesk-text", system-ui, sans-serif;
  font-weight: 800;

  /* your tuning knob */
  line-height: 1.32;

  /* ensure nothing accidentally underlines the container */
  text-decoration: none !important;
}

/* Title words: multi-line underline + hover highlight
   FIX: stable two-layer backgrounds, no shorthand reset; underline stays ABOVE highlight */
html.a11y .title-text,
body.a11y .title-text,
html.accessibility .title-text,
body.accessibility .title-text,
html[data-a11y="1"] .title-text,
body[data-a11y="1"] .title-text {
  display: inline;
  line-height: 1.22;

  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;

  /* layer 1 = underline (always on, sits ABOVE fill)
     layer 2 = fill (transparent by default) */
  background-image:
    linear-gradient(var(--a11y-blue), var(--a11y-blue)),
    linear-gradient(transparent, transparent);
  background-repeat: no-repeat, no-repeat;

  /* underline thickness + full fill */
  background-size: 100% 3px, 100% 100%;

  /* underline vertical position + fill origin */
  background-position: 0 calc(100% - 0.10em), 0 0;

  /* room for underline vs descenders */
  padding-bottom: 0.14em;
}

/* slightly thinner underline on mobile */
@media (max-width: 900px) {
  html.a11y .title-text,
  body.a11y .title-text,
  html.accessibility .title-text,
  body.accessibility .title-text,
  html[data-a11y="1"] .title-text,
  body[data-a11y="1"] .title-text {
    background-size: 100% 2px, 100% 100%;
  }
}

/* Hover highlight ONLY on title words (do NOT reset background; just swap fill to yellow) */
html.a11y .post-item:hover .title-text,
body.a11y .post-item:hover .title-text,
html.accessibility .post-item:hover .title-text,
body.accessibility .post-item:hover .title-text,
html[data-a11y="1"] .post-item:hover .title-text,
body[data-a11y="1"] .post-item:hover .title-text {
  color: #000 !important;

  background-image:
    linear-gradient(var(--a11y-blue), var(--a11y-blue)),
    linear-gradient(var(--a11y-yellow), var(--a11y-yellow));
}

/* Kill any legacy hover on whole title in a11y mode */
html.a11y .post-item:hover .post-title,
body.a11y .post-item:hover .post-title,
html.accessibility .post-item:hover .post-title,
body.accessibility .post-item:hover .post-title,
html[data-a11y="1"] .post-item:hover .post-title,
body[data-a11y="1"] .post-item:hover .post-title {
  background: transparent !important;
  color: #000 !important;
}

/* -----------------------------------------
   A11y layout: put date/meta on its own line (CSS-only)
   ----------------------------------------- */
html.a11y .nowrap,
body.a11y .nowrap,
html.accessibility .nowrap,
body.accessibility .nowrap,
html[data-a11y="1"] .nowrap,
body[data-a11y="1"] .nowrap {
  display: contents !important;
  white-space: normal !important;
}

/* Date + author: NEVER underline */
html.a11y .post-date,
body.a11y .post-date,
html.accessibility .post-date,
body.accessibility .post-date,
html[data-a11y="1"] .post-date,
body[data-a11y="1"] .post-date,
html.a11y .post-author,
body.a11y .post-author,
html.accessibility .post-author,
body.accessibility .post-author,
html[data-a11y="1"] .post-author,
body[data-a11y="1"] .post-author {
  text-decoration: none !important;
  text-decoration-line: none !important;
  background: transparent !important;
  color: #000 !important;
}

/* A11y: meta sizing baseline (desktop) — homepage/search + post page match */
html.a11y .post-list .post-date,
body.a11y .post-list .post-date,
html.accessibility .post-list .post-date,
body.accessibility .post-list .post-date,
html[data-a11y="1"] .post-list .post-date,
body[data-a11y="1"] .post-list .post-date,
html.a11y #searchResults .post-date,
body.a11y #searchResults .post-date,
html.accessibility #searchResults .post-date,
body.accessibility #searchResults .post-date,
html[data-a11y="1"] #searchResults .post-date,
body[data-a11y="1"] #searchResults .post-date {
  display: block !important;
  margin-top: 14px !important;

  /* bigger on desktop a11y */
  font-size: 2.2rem !important;
  line-height: 1.25 !important;

  position: static !important;
  top: auto !important;
}

/* Post page meta block (date + author) */
html.a11y .post-meta-inline,
body.a11y .post-meta-inline,
html.accessibility .post-meta-inline,
body.accessibility .post-meta-inline,
html[data-a11y="1"] .post-meta-inline,
body[data-a11y="1"] .post-meta-inline {
  display: block !important;
  margin: 14px 0 0 0 !important;

  font-size: 2.2rem !important;
  line-height: 1.25 !important;

  position: static !important;
  top: auto !important;
}

/* Force the actual text nodes inside meta to ignore normal-mode em sizing */
html.a11y .post-meta-inline .post-date,
body.a11y .post-meta-inline .post-date,
html.accessibility .post-meta-inline .post-date,
body.accessibility .post-meta-inline .post-date,
html[data-a11y="1"] .post-meta-inline .post-date,
body[data-a11y="1"] .post-meta-inline .post-date,
html.a11y .post-meta-inline .post-author,
body.a11y .post-meta-inline .post-author,
html.accessibility .post-meta-inline .post-author,
body.accessibility .post-meta-inline .post-author,
html[data-a11y="1"] .post-meta-inline .post-author,
body[data-a11y="1"] .post-meta-inline .post-author {
  font-size: 1em !important;
  line-height: 1.25 !important;
  position: static !important;
  top: auto !important;
}

html.a11y .post-meta-inline .post-author,
body.a11y .post-meta-inline .post-author,
html.accessibility .post-meta-inline .post-author,
body.accessibility .post-meta-inline .post-author,
html[data-a11y="1"] .post-meta-inline .post-author,
body[data-a11y="1"] .post-meta-inline .post-author {
  margin-top: 6px !important;
}

/* -----------------------------------------
   Captions: force BELOW images in a11y mode (all viewports)
   ----------------------------------------- */
html.a11y .post-featured .figure__cap,
html.a11y .figure__cap,
body.a11y .post-featured .figure__cap,
body.a11y .figure__cap,
html.accessibility .post-featured .figure__cap,
html.accessibility .figure__cap,
body.accessibility .post-featured .figure__cap,
body.accessibility .figure__cap,
html[data-a11y="1"] .post-featured .figure__cap,
html[data-a11y="1"] .figure__cap,
body[data-a11y="1"] .post-featured .figure__cap,
body[data-a11y="1"] .figure__cap {
  position: static !important;
  left: auto !important;
  bottom: auto !important;
  width: auto !important;
  margin-top: 10px !important;
  text-align: left !important;
  color: #000 !important;
}

/* -----------------------------------------
   Prev/Next hover highlight
   ----------------------------------------- */
html.a11y .post-nav-link:hover,
body.a11y .post-nav-link:hover,
html.accessibility .post-nav-link:hover,
body.accessibility .post-nav-link:hover,
html[data-a11y="1"] .post-nav-link:hover,
body[data-a11y="1"] .post-nav-link:hover {
  background: var(--a11y-yellow);
  color: #000 !important;
}

/* -----------------------------------------
   Search: icon black, input black, underline always blue
   ----------------------------------------- */
html.a11y .search-inline-icon,
body.a11y .search-inline-icon,
html.accessibility .search-inline-icon,
body.accessibility .search-inline-icon,
html[data-a11y="1"] .search-inline-icon,
body[data-a11y="1"] .search-inline-icon {
  color: #000 !important;
  opacity: 1 !important;
}

html.a11y .search-input,
body.a11y .search-input,
html.accessibility .search-input,
body.accessibility .search-input,
html[data-a11y="1"] .search-input,
body[data-a11y="1"] .search-input {
  color: rgba(0, 0, 0, 0.88) !important;
  caret-color: var(--a11y-blue);
}

html.a11y .search-line,
body.a11y .search-line,
html.accessibility .search-line,
body.accessibility .search-line,
html[data-a11y="1"] .search-line,
body[data-a11y="1"] .search-line {
  border-bottom: 3px solid var(--a11y-blue) !important;
}

/* -----------------------------------------
   Footer: black text on white highlight, no outline
   ----------------------------------------- */
html.a11y .site-footer,
body.a11y .site-footer,
html.accessibility .site-footer,
body.accessibility .site-footer,
html[data-a11y="1"] .site-footer,
body[data-a11y="1"] .site-footer {
  background: #fff !important;
  color: #000 !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;

  /* keep it pushed to the bottom on short pages */
  margin-top: auto;
}

/* A11y: post page title is not a link, so remove underline/highlight */
html.a11y .post-header .title-text,
body.a11y .post-header .title-text,
html.accessibility .post-header .title-text,
body.accessibility .post-header .title-text,
html[data-a11y="1"] .post-header .title-text,
body[data-a11y="1"] .post-header .title-text {
  background-image: none !important; /* kills underline layer */
}

/* optional: make sure it never highlights on hover inside the post header */
html.a11y .post-header .title-text:hover,
body.a11y .post-header .title-text:hover,
html.accessibility .post-header .title-text:hover,
body.accessibility .post-header .title-text:hover,
html[data-a11y="1"] .post-header .title-text:hover,
body[data-a11y="1"] .post-header .title-text:hover {
  background-image: none !important;
  background-color: transparent !important;
}

/* =========================================
   A11y: Post excerpt readability
   ========================================= */

html.a11y .post-excerpt,
body.a11y .post-excerpt,
html.accessibility .post-excerpt,
body.accessibility .post-excerpt,
html[data-a11y="1"] .post-excerpt,
body[data-a11y="1"] .post-excerpt {
  line-height: 1.6;
}

/* =========================================
   A11y: Prev / Next links should look like links
   ========================================= */

html.a11y .post-nav-link,
body.a11y .post-nav-link,
html.accessibility .post-nav-link,
body.accessibility .post-nav-link,
html[data-a11y="1"] .post-nav-link,
body[data-a11y="1"] .post-nav-link {
  text-decoration-line: underline;
  text-decoration-color: var(--a11y-blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

/* =========================================
   A11y: Image captions readability
   ========================================= */

html.a11y .figure__cap,
body.a11y .figure__cap,
html.accessibility .figure__cap,
body.accessibility .figure__cap,
html[data-a11y="1"] .figure__cap,
body[data-a11y="1"] .figure__cap {
  font-size: 1.05rem;
  line-height: 1.6;
}

/* =========================================
   A11y: Body text readability
   ========================================= */

html.a11y .post-body,
body.a11y .post-body,
html.accessibility .post-body,
body.accessibility .post-body,
html[data-a11y="1"] .post-body,
body[data-a11y="1"] .post-body {
  font-size: 1.08rem;
  line-height: 1.7;
}

/* A11y: mobile tune — keep everything consistent, slightly larger */
@media (max-width: 900px) {
  html.a11y .post-list .post-date,
  body.a11y .post-list .post-date,
  html.accessibility .post-list .post-date,
  body.accessibility .post-list .post-date,
  html[data-a11y="1"] .post-list .post-date,
  body[data-a11y="1"] .post-list .post-date,
  html.a11y #searchResults .post-date,
  body.a11y #searchResults .post-date,
  html.accessibility #searchResults .post-date,
  body.accessibility #searchResults .post-date,
  html[data-a11y="1"] #searchResults .post-date,
  body[data-a11y="1"] #searchResults .post-date {
    margin-top: 10px !important;
    font-size: 1.7rem !important;
    line-height: 1.25 !important;
  }

  html.a11y .post-header .post-meta-inline,
  body.a11y .post-header .post-meta-inline,
  html.accessibility .post-header .post-meta-inline,
  body.accessibility .post-header .post-meta-inline,
  html[data-a11y="1"] .post-header .post-meta-inline,
  body[data-a11y="1"] .post-header .post-meta-inline {
    font-size: 1.7rem !important;
    line-height: 1.25 !important;
  }

  html.a11y .post-header .post-meta-inline .post-author,
  body.a11y .post-header .post-meta-inline .post-author,
  html.accessibility .post-header .post-meta-inline .post-author,
  body.accessibility .post-header .post-meta-inline .post-author,
  html[data-a11y="1"] .post-header .post-meta-inline .post-author,
  body[data-a11y="1"] .post-header .post-meta-inline .post-author {
    margin-top: 8px !important;
  }
}
