/* casually.onl — layout + components */

/* ───────────────────────── base ───────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  transition: background-color .25s ease, color .25s ease;
}

.wrap { width: min(100% - 2 * var(--gut), var(--maxw)); margin-inline: auto; }

.block { margin-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.block--lead { margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem); } /* hero leading a page, no banner above */

.block__label,
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.block__label {
  display: inline-block;
  margin-bottom: 1.1rem;
  padding-bottom: .35rem;
  border-bottom: var(--border) solid var(--line);
  color: var(--text);
}

/* ───────────────────────── header ───────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: var(--border) solid var(--line);
}

.site-header__inner {
  width: min(100% - 2 * var(--gut), var(--maxw));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 0;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  letter-spacing: -.02em;
  line-height: 1;
  white-space: nowrap;
}
.brand__tld { color: var(--accent); }

.nav {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

/* category chips (sticker style) */
.chip {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 700;
  padding: .3rem .7rem;
  border: var(--border) solid var(--line);
  border-radius: 999px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, background-color .12s ease, color .12s ease;
}
.chip:hover,
.chip:focus-visible {
  background: var(--cat);
  color: var(--cat-ink);
  transform: rotate(0) translateY(-2px);
}
/* on a category page, its own nav chip wears the hover look, unless another
   chip is being hovered (so only one ever reads as active at a time) */
.nav:not(:has(.chip:hover)) .chip.is-current {
  background: var(--cat);
  color: var(--cat-ink);
  transform: rotate(0) translateY(-2px);
}

.toggle {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  border: var(--border) solid var(--line);
  border-radius: 999px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease;
}
.toggle:hover { transform: rotate(-8deg) scale(1.05); }

/* mobile menu: the open button is hidden and the nav + toggle lay out inline
   until the drawer breakpoint kicks in (see the responsive section). */
.navtoggle { display: none; }
.navtoggle:hover { transform: scale(1.05); }
.sitemenu { display: contents; }

/* ───────────────────────── ticker ───────────────────────── */
.ticker {
  background: var(--ink);
  color: var(--paper);
  border-bottom: var(--border) solid var(--line);
  overflow: hidden;
  position: relative;
}
.ticker:empty { display: none; } /* no headlines (e.g. empty category) → no bar */
:root[data-theme="dark"] .ticker { background: #000; color: var(--paper); }
.ticker::before {
  content: "LATEST";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0 .9rem;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .12em;
  background: var(--accent);
  color: var(--accent-ink);
  border-right: var(--border) solid var(--line);
}
.ticker__track {
  display: inline-flex;
  gap: 2.5rem;
  padding: .55rem 0 .55rem 8rem;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.ticker__item:hover { text-decoration: underline; text-decoration-color: var(--cat); }
.ticker__dot {
  width: .55rem; height: .55rem;
  border-radius: 999px;
  background: var(--cat);
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; overflow-x: auto; }
}

/* ───────────────────── cards (signature) ───────────────────── */
.card {
  --reg: 6px; /* riso misregistration offset */
}
.card__link {
  display: block;
  height: 100%;
  background: var(--bg-panel);
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease;
}
.card__link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 var(--line);
}

.card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-sunk);
  border-bottom: var(--border) solid var(--line);
}
/* base (neutral, slightly desaturated) layer */
.card__media .media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(1.05);
  transition: transform .3s ease;
}

/* real per-article photo, loaded over the generated placeholder */
.media__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}
/* when a real photo is present, drop the duotone treatment so it shows true color */
.has-photo .media { filter: none !important; }
.has-photo::after { opacity: 0 !important; }
/* category-colored ink, offset = riso misregistration */
.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cat);
  mix-blend-mode: var(--media-blend);
  opacity: .9;
  transform: translate(var(--reg), calc(-1 * var(--reg)));
  transition: transform .3s ease;
}
.card__link:hover .card__media::after { transform: translate(0, 0); }
.card__link:hover .media { transform: scale(1.04); }

.card__tag {
  position: absolute;
  left: .7rem; bottom: .7rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  padding: .22rem .55rem;
  background: var(--cat);
  color: var(--cat-ink);
  border: 2px solid var(--line);
  border-radius: 999px;
}

.card__body { display: block; padding: 1rem 1.1rem 1.15rem; }
.card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h3);
  letter-spacing: -.015em;
}
.card__link:hover .card__title { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--cat); }
.card__excerpt {
  margin-top: .5rem;
  color: var(--text-soft);
  font-size: var(--fs-small);
}

.meta {
  margin-top: .85rem;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  color: var(--text-soft);
}
.meta time::before,
.meta .meta__rt::before { content: "· "; }

/* hero variant — two-up on desktop */
.card--hero .card__link { display: grid; }
.card--hero .card__title { font-size: var(--fs-hero); }
.card--hero .card__excerpt { font-size: var(--fs-lead); }
.card--hero .card__body { padding: clamp(1.2rem, .6rem + 2vw, 2.2rem); align-self: center; }
@media (min-width: 760px) {
  .card--hero .card__link { grid-template-columns: 1.15fr 1fr; }
  .card--hero .card__media { aspect-ratio: auto; height: 100%; min-height: 300px; border-bottom: none; border-right: var(--border) solid var(--line); }

  /* Keep the feature story within view on a laptop: a tamer headline than the
     full --fs-hero, a tighter leading, and an excerpt capped to a few lines. */
  .card--hero .card__title { font-size: clamp(2rem, 1.1rem + 2.4vw, 3.2rem); line-height: 1.04; }
  .card--hero .card__excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
}

/* wide variant — horizontal feed row on desktop */
.stack { display: grid; gap: 1.4rem; }
@media (min-width: 620px) {
  .card--wide .card__link { display: grid; grid-template-columns: .9fr 1.1fr; }
  .card--wide .card__media { aspect-ratio: auto; height: 100%; min-height: 200px; border-bottom: none; border-right: var(--border) solid var(--line); }
  .card--wide .card__body { align-self: center; }
}
.card--wide .card__title { font-size: var(--fs-h3); }

/* ─────────────── "fresh from the feed" + Mastodon sidebar ─────────────── */
/* On desktop the latest-articles stack and a Mastodon hashtag feed sit side by
   side; below the breakpoint the Mastodon panel stacks under the articles. */
.feedgrid { display: grid; gap: var(--gut); }
@media (min-width: 920px) {
  .feedgrid {
    grid-template-columns: minmax(0, 1fr) clamp(280px, 26vw, 340px);
    align-items: start;
  }
}

/* no enclosure — the head and posts are standalone, full-width pieces */
.mastofeed { display: grid; gap: .8rem; }
.mastofeed__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem .9rem;
  background: var(--accent);
  color: var(--accent-ink);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.mastofeed__icon { width: 1.15rem; height: 1.15rem; fill: currentColor; flex: 0 0 auto; }
.mastofeed__label {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.masto { display: grid; gap: .8rem; }
.masto__post {
  background: var(--bg-panel);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: .75rem .85rem;
  transition: transform .14s ease, box-shadow .14s ease;
}
.masto__post:hover {
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 var(--line);
}
.masto__boost {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  color: var(--text-soft);
  margin-bottom: .45rem;
}
.masto__author { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.masto__avatar {
  width: 2.1rem; height: 2.1rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  object-fit: cover;
  background: var(--bg-sunk);
  flex: 0 0 auto;
}
.masto__id { display: grid; min-width: 0; }
.masto__name,
.masto__handle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.masto__name { font-weight: 700; font-size: var(--fs-small); line-height: 1.15; }
.masto__handle { font-family: var(--font-mono); font-size: var(--fs-eyebrow); color: var(--text-soft); }
.masto__author:hover .masto__name { text-decoration: underline; text-decoration-color: var(--accent); }

.masto__body {
  margin-top: .55rem;
  font-size: var(--fs-small);
  line-height: 1.45;
  overflow-wrap: anywhere;
  /* keep posts compact — long content (and trailing hashtag walls) is trimmed */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}
.masto__body p { margin: 0 0 .5rem; }
.masto__body p:last-child { margin-bottom: 0; }
.masto__body .invisible { display: none; }       /* Mastodon hides URL scheme/host */
.masto__body .ellipsis::after { content: "…"; }
.masto__link { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; }

.masto__meta {
  margin-top: .6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  color: var(--text-soft);
}
.masto__time:hover { text-decoration: underline; }
.masto__note { font-size: var(--fs-small); color: var(--text-soft); padding: .4rem 0; }

/* ───────────────────────── author profile ───────────────────────── */
.author-hero {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
@media (min-width: 620px) {
  .author-hero { grid-template-columns: auto 1fr; gap: 1.75rem; }
}
.author-avatar {
  position: relative;
  width: clamp(84px, 9vw, 128px);
  height: clamp(84px, 9vw, 128px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  background: var(--accent);
  box-shadow: var(--shadow-sm);
}
.author-avatar__ph {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 1rem + 2vw, 2.8rem);
  letter-spacing: -.02em;
  color: var(--accent-ink);
}
.author-avatar__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.author-hero__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h1);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin-top: .15rem;
}
.author-bio {
  margin-top: .7rem;
  max-width: 60ch;
  color: var(--text-soft);
  font-size: var(--fs-lead);
}
.author-links { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.author-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 700;
  border: var(--border) solid var(--line);
  border-radius: 999px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, background-color .12s ease, color .12s ease;
}
.author-link:hover { transform: translateY(-2px); background: var(--accent); color: var(--accent-ink); }
.author-link__icon { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }

/* ───────────────────────── grids ───────────────────────── */
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }

/* homepage category sections */
.catsec { margin-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.catsec__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  padding-bottom: .5rem;
  border-bottom: var(--border) solid var(--cat);
}
.catsec__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h2);
  letter-spacing: -.02em;
}
.catsec__more {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 700;
  padding: .25rem .6rem;
  background: var(--cat);
  color: var(--cat-ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.catsec__more:hover { transform: translateY(-1px); }

/* ─────────────────── category page header ─────────────────── */
.cathead {
  margin: clamp(1.5rem, 1rem + 2vw, 3rem) 0;
  padding: clamp(1.5rem, 1rem + 3vw, 3rem);
  background: var(--cat);
  color: var(--cat-ink);
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.cathead__emoji { font-size: clamp(2.5rem, 1.5rem + 4vw, 4rem); display: block; }
.cathead__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h1);
  letter-spacing: -.02em;
  margin-top: .3rem;
}
.cathead__blurb { max-width: 46ch; margin: .8rem auto 0; font-size: var(--fs-lead); }
.cathead__count {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 700;
  padding: .25rem .7rem;
  border: 2px solid currentColor;
  border-radius: 999px;
}

/* ───────────────────────── article ───────────────────────── */
.post { width: min(100% - 2 * var(--gut), 760px); margin: clamp(1.5rem, 1rem + 2vw, 3rem) auto 0; }
.post__cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 700;
  padding: .28rem .7rem;
  background: var(--cat);
  color: var(--cat-ink);
  border: 2px solid var(--line);
  border-radius: 999px;
}
.post__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h1);
  letter-spacing: -.025em;
  margin-top: 1rem;
}
.post__excerpt {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-lead);
  color: var(--text-soft);
}
.byline-link { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.byline-link:hover { color: var(--accent); }

/* share row */
.post__share {
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 2px solid var(--hairline);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
}
.post__share-label {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-right: .3rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text);
  background: var(--bg-panel);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, color .12s ease;
}
.share-btn:hover { transform: translate(-1px, -1px); background: var(--accent); color: var(--accent-ink); }
.share-btn[hidden] { display: none; }
.share-btn__icon { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }

.post__meta {
  margin-top: 1.2rem;
  padding: .7rem 0;
  border-top: 2px solid var(--hairline);
  border-bottom: 2px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-soft);
}
.post__media {
  position: relative;
  margin: 1.6rem 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-sunk);
  box-shadow: var(--shadow);
}
.post__media .media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(1.05);
}
.post__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cat);
  mix-blend-mode: var(--media-blend);
  opacity: .9;
}
.post__body { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.7; }
.post__body p { margin-top: 1.2rem; }
.post__body p:first-child { margin-top: 0; }
.post__body p:first-child::first-letter {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.6em;
  line-height: .8;
  float: left;
  margin: .05em .12em 0 0;
  color: var(--cat);
}

/* story-arc section divider — a short line set big, between acts of a long piece */
.post__break {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.55rem, 1.1rem + 1.7vw, 2.15rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  color: var(--cat);
  max-width: 24ch;
  margin: 2.8rem 0 1.6rem;
  padding-top: 1.7rem;
  border-top: 3px solid var(--cat);
}
.post__break::first-letter { float: none; font-size: inherit; margin: 0; } /* never a drop-cap */

/* optional per-section image (section_image_N.webp), shown under its divider */
.post__section-photo {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.6rem 0 .4rem;
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* article tags */
.post__tags {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
}
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  padding: .22rem .6rem;
  background: var(--bg-sunk);
  color: var(--text-soft);
  border: 2px solid var(--hairline);
  border-radius: 999px;
  transition: background-color .12s ease, color .12s ease, transform .12s ease;
}
a.tag:hover,
a.tag:focus-visible {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--line);
  transform: translateY(-1px);
}

/* inline citation markers */
.cite {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .62em;
  vertical-align: super;
  line-height: 0;
}
.cite a { color: var(--cat); text-decoration: none; }
.cite a:hover { text-decoration: underline; }

/* inline named source link — "as reported by [Org]" */
.srcref {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--cat);
  text-underline-offset: 3px;
}
.srcref:hover { color: var(--cat); }

/* sources list under an article */
.post__sources {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--hairline);
}
.post__sources-title {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: .8rem;
}
.srclist {
  margin: 0;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: var(--fs-small);
}
.srclist li { line-height: 1.4; }
.srclist li::marker { color: var(--cat); font-family: var(--font-mono); font-weight: 700; }
.srclist a { color: var(--text); text-decoration: underline; text-decoration-color: var(--cat); text-underline-offset: 3px; }
.srclist a:hover { color: var(--cat); }
.srclist__pub {
  display: inline-block;
  margin-left: .5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  color: var(--text-soft);
}
.srclist__pub::before { content: "· "; }

.more {
  width: min(100% - 2 * var(--gut), var(--maxw));
  margin: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) auto 0;
  padding-top: 2rem;
  border-top: var(--border) solid var(--line);
}
.more:empty { display: none; } /* hide "More"/"Related" asides with no items */
.more__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h2);
  letter-spacing: -.02em;
  margin-bottom: 1.2rem;
}

/* ───────────────────────── empty state ───────────────────────── */
.empty {
  width: min(100% - 2 * var(--gut), 600px);
  margin: 4rem auto;
  text-align: center;
  padding: 2.5rem;
  background: var(--bg-panel);
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.empty h1 { font-family: var(--font-display); font-size: var(--fs-h2); margin-bottom: .6rem; }
.empty a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ───────────────────────── footer ───────────────────────── */
.site-footer {
  margin-top: clamp(3rem, 2rem + 5vw, 6rem);
  background: var(--ink);
  color: var(--paper);
  border-top: var(--border) solid var(--line);
}
:root[data-theme="dark"] .site-footer { background: #000; }
.site-footer__inner {
  width: min(100% - 2 * var(--gut), var(--maxw));
  margin-inline: auto;
  padding: 2.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
}
.site-footer__brand { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.site-footer__tag { font-family: var(--font-mono); font-size: var(--fs-small); opacity: .75; margin-top: .4rem; }
.site-footer__cats { display: flex; flex-wrap: wrap; gap: .9rem; }
.site-footer__cats a { font-family: var(--font-mono); font-size: var(--fs-small); }
.site-footer__cats a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.site-footer__legal { font-family: var(--font-mono); font-size: var(--fs-eyebrow); opacity: .6; margin: 0; }

/* full-width bottom bar: copyright on the left, social on the right */
.site-footer__bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .25rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(244, 241, 234, 0.14);
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--paper);
  transition: color .12s ease;
}
.social-link:hover { color: var(--accent); }
.social-link__icon { width: 1.15rem; height: 1.15rem; fill: currentColor; display: block; flex: 0 0 auto; }

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width: 720px) {
  /* The category nav + theme toggle collapse into a right-hand drawer. A single
     button (sitting where the theme toggle used to) opens it; once open the
     same button floats over the drawer as a close (✕). */
  .navtoggle {
    display: grid;
    margin-left: auto;
    font-size: 1.5rem;
    line-height: 1;
  }
  /* Keep the button IN the header flow while open (so the bar doesn't change
     height and shift the page) — just lift it above the drawer as the close. */
  .menu-open .navtoggle {
    position: relative;
    z-index: 2;
  }

  .sitemenu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;       /* right-justified vertical stack */
    gap: 1.25rem;
    position: fixed;
    inset: 0 0 0 auto;           /* pinned to the right edge, full height */
    width: min(80vw, 320px);
    padding: 3.75rem var(--gut) calc(1.5rem + env(safe-area-inset-bottom));
    background: var(--bg-panel);
    border-left: var(--border) solid var(--line);
    box-shadow: -6px 0 24px rgba(0, 0, 0, .25);
    transform: translateX(100%);
    transition: transform .24s ease;
    overflow-y: auto;
    z-index: 1;
  }
  .sitemenu.is-open { transform: translateX(0); }

  /* nav: vertical, right-aligned, with larger tap targets */
  .sitemenu .nav {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: .7rem;
    width: 100%;
  }
  .sitemenu .chip { font-size: var(--fs-body); }

  /* theme toggle anchored to the bottom of the drawer */
  .sitemenu .toggle { margin-top: auto; }

  /* lift the header (and its drawer) above the page scrim while open */
  .menu-open .site-header { z-index: 100; }

  /* dim + lock the page behind the open drawer */
  .menu-open,
  .menu-open body { overflow: hidden; }
  .menu-open body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 90;
  }
}

/* ───────────────────── design treatment ───────────────────── */
/* High-contrast, hard-edged surfaces: a graph-paper ground, square corners,
   uppercase utilitarian labels, and flat duotone media. */

body {
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 22px 22px;
  background-attachment: fixed;
}

.chip,
.toggle,
.card__tag,
.ticker__dot,
.cathead__count,
.catsec__more,
.post__cat,
.masto__avatar,
.author-link { border-radius: 0; }

.site-header { border-bottom-width: 4px; }
.brand { letter-spacing: -0.04em; text-transform: lowercase; }
.brand__tld { background: var(--accent); color: var(--accent-ink); padding: 0 0.12em; }

.chip { transform: none; text-transform: uppercase; letter-spacing: 0.02em; box-shadow: var(--shadow-sm); }
.chip:hover,
.chip:focus-visible { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--line); }
.nav:not(:has(.chip:hover)) .chip.is-current { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--line); }
.toggle:hover { transform: translate(-1px, -1px); }

.ticker { background: #000; color: #fff; border-bottom-width: 4px; }
.ticker::before { background: var(--accent); color: var(--accent-ink); text-transform: uppercase; }
.ticker__item { text-transform: uppercase; }
.ticker__dot { width: 0.5rem; height: 0.5rem; }

.card__link:hover,
.masto__post:hover { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 var(--line); }
.card__media .media { filter: grayscale(1) contrast(1.25); transform: none; }
.card__media::after { transform: none; opacity: 0.78; }
.card__link:hover .card__media::after { transform: none; }
.card__link:hover .media { transform: none; }
.card__tag { text-transform: uppercase; border-width: 2px; font-weight: 700; }
.card__link:hover .card__title { text-decoration: underline; text-decoration-thickness: 3px; }

.card--hero .card__title,
.post__title,
.cathead__title,
.catsec__title,
.more__title,
.empty h1 { text-transform: uppercase; letter-spacing: -0.01em; font-weight: 900; line-height: 0.98; }

.post {
  background: var(--bg-panel);
  border: var(--border) solid var(--line);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 1rem + 3vw, 3rem);
  margin-top: clamp(1.5rem, 1rem + 2vw, 3rem);
}
.post__media { box-shadow: none; }
.more__title {
  display: inline-block;
  background: var(--bg-panel);
  border: var(--border) solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 0.35rem 0.7rem;
}
.post__cat { text-transform: uppercase; border-width: 2px; }
.post__excerpt { font-style: normal; font-family: var(--font-mono); font-size: var(--fs-body); }
.post__body p:first-child::first-letter {
  background: var(--cat);
  color: #000;
  padding: 0.06em 0.16em 0 0.16em;
  margin: 0.02em 0.12em 0 0;
  font-size: 3.2em;
}

.catsec__more { text-transform: uppercase; border-width: 2px; }
.catsec__more:hover { transform: translate(-1px, -1px); }

.site-footer { background: #000; color: #fff; border-top-width: 4px; }
.site-footer__cats a { text-decoration: underline; text-underline-offset: 3px; }
