/* ==========================================================================
   abstractwallpaper.com — "Editorial Gallery"
   Dark art-book theme: serif display, clean sans body, azure accent, hairline
   rules, generous whitespace, restrained motion.

   Deliberately NOT Unique Live Wallpaper: none of its phosphor cyan, none of its
   amber, no radar-scope motif. Different brand, different room. (The test suite
   greps this file for those two ULW hex values, so do not name them here either.)
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette */
  --bg: #07090d;
  --surface: #0d1117;
  --surface-2: #131a23;
  --text: #e8eef5;
  --muted: #8b98a8;
  --azure: #4da3ff;
  --azure-soft: #8cc6ff;
  --azure-dim: rgba(77, 163, 255, 0.14);
  --line: rgba(232, 238, 245, 0.10);
  --line-strong: rgba(232, 238, 245, 0.20);

  /* Type */
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --shell: 1360px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --gap: clamp(1.25rem, 2.4vw, 2.25rem);
  --radius: 3px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(0.98rem, 0.35vw + 0.9rem, 1.06rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--azure); text-decoration: none; }
a:hover { color: var(--azure-soft); }

:focus-visible {
  outline: 2px solid var(--azure-soft);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--azure);
  color: #04070b;
  padding: 0.7rem 1.2rem;
  font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --- Typography ---------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.3rem, 5.2vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
h3 { font-size: clamp(1.08rem, 1.1vw, 1.3rem); letter-spacing: -0.005em; }

p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.page-lede,
.hero-lede {
  color: var(--muted);
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.16rem);
  max-width: 62ch;
}

.page-count {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 0.9rem;
}
.page-count strong { color: var(--text); font-size: 1.15rem; font-weight: 500; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 9, 13, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
}
.brand:hover { color: var(--text); }

.brand-mark {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-strong);
  padding: 0.32rem 0.44rem;
  color: var(--azure);
}

.brand-word {
  font-family: var(--display);
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-word em { font-style: italic; color: var(--muted); }

.site-search {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 30rem;
  width: 100%;
  justify-self: center;
  transition: border-color 0.2s var(--ease);
}
.site-search:focus-within { border-color: var(--azure); }

.site-search input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.92rem;
  padding: 0.6rem 0.85rem;
}
.site-search input::placeholder { color: var(--muted); }
.site-search input:focus { outline: none; }

.site-search button {
  flex: 0 0 auto;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--azure);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 1rem;
  cursor: pointer;
}
.site-search button:hover { background: var(--azure-dim); color: var(--azure-soft); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.6vw, 1.7rem);
  font-size: 0.88rem;
}
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--text); }
.site-nav .nav-outbound { color: var(--azure); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.6rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.nav-bar { display: block; width: 18px; height: 1px; background: var(--text); }

/* --- Layout -------------------------------------------------------------- */

main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(4rem, 9vw, 7rem);
}

.section { margin-top: clamp(3.5rem, 7vw, 6rem); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.9rem;
  margin-bottom: var(--gap);
}
.section-head h2 { margin: 0; }
.section-more {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.page-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(1.75rem, 3vw, 2.75rem);
  margin-bottom: var(--gap);
  max-width: 74ch;
}
.page-head h1 { margin-bottom: 0.4em; }

.breadcrumbs { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0; padding: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--azure-soft); }

/* --- Hero ---------------------------------------------------------------- */

.hero {
  display: grid;
  gap: var(--gap);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.hero-text { max-width: 30ch; }
.hero h1 { max-width: 16ch; }
.hero-lede { max-width: 58ch; }
.hero-text { max-width: none; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2rem 0 0;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin: 2.75rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.hero-stats div { margin: 0; }
.hero-stats dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-stats dd {
  margin: 0.35rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1;
}

/* --- Buttons ------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  background: var(--azure);
  color: #04070b;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--azure);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.button:hover { background: var(--azure-soft); border-color: var(--azure-soft); color: #04070b; }
.button em { font-style: normal; font-family: var(--mono); font-size: 0.76rem; opacity: 0.72; }

.button-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.button-ghost:hover { background: var(--azure-dim); border-color: var(--azure); color: var(--text); }

.button-download { font-size: 1rem; padding: 0.95rem 1.7rem; }

/* --- Grid + cards -------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  grid-auto-flow: row dense;
  gap: var(--gap);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.card:hover { border-color: var(--line-strong); }
.card:focus-within { border-color: var(--azure); }

@media (min-width: 64rem) {
  .card.is-wide { grid-column: span 2; }
}

.card-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 16 / 9;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.5s var(--ease);
  filter: saturate(0.95);
}
.card:hover .card-media img { transform: scale(1.055); filter: saturate(1.05); }

.card-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 1rem;
  padding: 1.1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--line);
}

.card-index {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: rgba(139, 152, 168, 0.35);
  padding-top: 0.15rem;
}

.card-title { margin: 0 0 0.35rem; font-size: 1.14rem; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--azure-soft); }

/* Stretched link: the whole card opens the detail page, but the CTA sits above it. */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-specs {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

/* --- CTA overlay (the reason this site exists) --------------------------- */

.cta-overlay {
  position: absolute;
  z-index: 3;
  left: 0.85rem;
  bottom: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(7, 9, 13, 0.82);
  border: 1px solid var(--azure);
  color: var(--azure-soft);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), background-color 0.2s var(--ease);
}
.cta-overlay::after { content: "\2197"; }
.card:hover .cta-overlay,
.card:focus-within .cta-overlay,
.cta-overlay:focus-visible {
  opacity: 1;
  transform: translateY(0);
}
.cta-overlay:hover { background: var(--azure); color: #04070b; }

/* Always visible where there is only one image on the page. */
.detail-media .cta-overlay {
  opacity: 1;
  transform: none;
  left: auto;
  right: 1.1rem;
  bottom: 1.1rem;
  font-size: 0.74rem;
  padding: 0.6rem 1rem;
}

/* Touch devices have no hover: never hide the CTA there. */
@media (hover: none) {
  .cta-overlay { opacity: 1; transform: none; }
}

/* --- Tag chips ----------------------------------------------------------- */

.tag-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}
.tag-chips li { margin: 0; }
.tag-chips a {
  position: relative;
  z-index: 2;
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.tag-chips a:hover { color: var(--azure-soft); border-color: var(--azure); background: var(--azure-dim); }
.tag-chips a span { color: rgba(139, 152, 168, 0.6); margin-left: 0.3rem; }

.tag-chips-large { gap: 0.55rem; margin-top: 1rem; }
.tag-chips-large a { font-size: 0.78rem; padding: 0.4rem 0.9rem; }

.modifier-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.4rem 0 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.modifier-chips li {
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

/* --- Hub grid ------------------------------------------------------------ */

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.hub {
  display: block;
  background: var(--surface);
  padding: 1.6rem 1.5rem 1.4rem;
  color: var(--text);
  transition: background-color 0.3s var(--ease);
}
.hub:hover { background: var(--surface-2); color: var(--text); }
.hub-index {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(139, 152, 168, 0.5);
  margin-bottom: 0.9rem;
}
.hub h3 { margin: 0 0 0.5rem; }
.hub p { color: var(--muted); font-size: 0.88rem; margin: 0 0 0.9rem; }
.hub-count {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--azure);
}

/* --- Tag index ----------------------------------------------------------- */

.tag-index {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.tag-index li { border-bottom: 1px solid var(--line); }
.tag-index a {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 14rem) 5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0.5rem;
  color: var(--text);
  transition: background-color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.tag-index a:hover { background: var(--surface); padding-left: 1rem; color: var(--text); }
.tag-index-num { font-family: var(--mono); font-size: 0.9rem; color: rgba(139, 152, 168, 0.4); }
.tag-index-label { font-family: var(--display); font-size: 1.25rem; }
.tag-index-count { font-family: var(--mono); font-size: 0.82rem; color: var(--azure); }
.tag-index-blurb { color: var(--muted); font-size: 0.86rem; }

@media (max-width: 56rem) {
  .tag-index a { grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
  .tag-index-blurb { display: none; }
}

/* --- Detail page --------------------------------------------------------- */

.detail-stage {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(0.5rem, 1.4vw, 1rem);
}
.detail-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-2);
}
.detail-media img { width: 100%; height: auto; }

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-top: clamp(2rem, 4vw, 3.25rem);
}

.detail-main h1 { margin-bottom: 0.35em; }
.detail-lede { color: var(--muted); max-width: 58ch; }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2rem 0 1rem;
}

.detail-note {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.detail-tags { margin-top: 2.25rem; }
.detail-tags h2,
.detail-side h2 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.detail-side { border-top: 1px solid var(--line); padding-top: 1.5rem; }
@media (min-width: 60rem) {
  .detail-side { border-top: 0; border-left: 1px solid var(--line); padding: 0 0 0 clamp(1.5rem, 3vw, 2.75rem); }
}

.spec-list { margin: 0 0 1.5rem; }
.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.spec-list dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.spec-list dd { margin: 0; font-size: 0.9rem; text-align: right; }

.detail-credit { font-size: 0.85rem; color: var(--muted); }

/* --- Pagination ---------------------------------------------------------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}
.pagination a { color: var(--azure); }
.pagination .is-disabled { color: rgba(139, 152, 168, 0.35); }
.page-status { color: var(--muted); text-align: center; }
.page-status em { display: block; font-style: normal; font-size: 0.72rem; opacity: 0.7; }

/* --- Search / empty states ---------------------------------------------- */

.search-panel {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  max-width: 34rem;
  margin-top: 1.5rem;
}
.search-panel:focus-within { border-color: var(--azure); }
.search-panel input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.85rem 1rem;
}
.search-panel input:focus { outline: none; }
.search-panel input::placeholder { color: var(--muted); }
.search-panel button {
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--azure);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 1.3rem;
  cursor: pointer;
}
.search-panel button:hover { background: var(--azure-dim); }

.empty,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(1.75rem, 4vw, 3rem);
  color: var(--muted);
}
.empty-state h2 { color: var(--text); margin-bottom: 0.5em; }
.empty-more { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.not-found { max-width: 60ch; }

/* --- Prose --------------------------------------------------------------- */

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.5rem; font-size: clamp(1.4rem, 2vw, 1.8rem); }
.prose ul { padding-left: 1.15rem; color: var(--muted); }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--text); }

.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--gap);
  margin-top: var(--gap);
}
.note-grid h3 { margin-bottom: 0.4rem; }
.note-grid p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.section-note { border-top: 1px solid var(--line); padding-top: clamp(2rem, 4vw, 3rem); }
.section-note > h2 { margin-bottom: 0; }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.5rem) var(--gutter) 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--gap);
}
.footer-about { max-width: 34ch; }
.footer-word {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}
.footer-word em { font-style: italic; color: var(--muted); }
.footer-about p { color: var(--muted); font-size: 0.9rem; }

.footer-col h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; font-size: 0.88rem; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--azure-soft); }
.footer-tags span { font-family: var(--mono); font-size: 0.7rem; opacity: 0.55; }

.footer-base {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1.4rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 62rem) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "search search"
      "nav nav";
    row-gap: 0.75rem;
  }
  .brand { grid-area: brand; }
  .nav-toggle { grid-area: toggle; display: flex; }
  .site-search { grid-area: search; max-width: none; justify-self: stretch; }
  .site-nav {
    grid-area: nav;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
  }
  .site-nav.is-open { display: flex; }
  .detail-body { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 40rem) {
  .card-body { grid-template-columns: minmax(0, 1fr); }
  .card-index { display: none; }
  .pagination { justify-content: center; }
}

/* --- Motion preferences -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .card:hover .card-media img { transform: none; }
  .cta-overlay { transform: none; }
}

/* --- Print --------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .cta-overlay, .pagination { display: none; }
  body { background: #fff; color: #000; }
}
