/* f7z.io — poster design system.
   Huge display type carries the beliefs; monospace annotations carry the facts.
   Mostly monochrome, one burnt-orange accent, hairline rules instead of boxes. */

:root {
  --bg: #f7f5f0;
  --ink: #131211;
  --muted-op: 0.52;
  --accent: #c9401f;
  --rule: rgba(19, 18, 17, 0.14);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  --display: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --pad-x: clamp(1.25rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0a;
    --ink: #f3f1ea;
    --muted-op: 0.56;
    --accent: #ff6a3d;
    --rule: rgba(243, 241, 234, 0.16);
  }
}

* { box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem var(--pad-x);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}

.masthead a { text-decoration: none; }
.masthead .who { opacity: 0.85; }
.masthead .id { opacity: 0.55; }

.mast-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.3rem;
}

.mast-nav a { opacity: 0.55; }
.mast-nav a:hover,
.mast-nav a:focus-visible { opacity: 1; color: var(--accent); }
.mast-nav a[aria-current="page"] { opacity: 1; color: var(--accent); }

/* ---------- page heading (inner pages) ---------- */

.page-head {
  padding: clamp(3rem, 8vw, 6rem) var(--pad-x) clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}

.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 1.1rem;
}

.page-title {
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.035em;
  font-size: clamp(2.4rem, 9vw, 6.5rem);
  margin: 0;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.page-title .dot { color: var(--accent); }

.page-note,
.tagline {
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.4vw, 0.95rem);
  letter-spacing: 0.04em;
  max-width: 44ch;
  margin: 1.4rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  opacity: var(--muted-op);
  line-height: 1.55;
  font-style: normal;
}

.page-note a,
.tagline a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.page-note a:hover,
.tagline a:hover { border-bottom-color: var(--accent); }

.subscribe {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  margin: 1rem 0 0;
}

.subscribe a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.subscribe a:hover { border-bottom-color: var(--accent); }
.subscribe .sep { opacity: 0.5; margin: 0 0.35em; }

/* ---------- content column ---------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad-x) clamp(3rem, 8vw, 5rem);
}

body.wide .page { max-width: 900px; }

.page p {
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0 0 1.6rem;
}

.page a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.page a:hover { border-bottom-color: var(--accent); }

.page h2 {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.55;
  margin: 2.6rem 0 1rem;
}

.page ul {
  padding-left: 1.2rem;
  margin: 0 0 1.6rem;
}

.page li {
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 0.45rem;
}

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

ul.plain li { margin-bottom: 1em; }

.back {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

/* ---------- poster (homepage) ---------- */

.poster { padding: 0 var(--pad-x); }

.fragment {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--rule);
  padding: 3rem 0;
  opacity: 1;
  transform: none;
}

.fragment:last-of-type { border-bottom: none; }

.frag-index {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  opacity: 0.5;
  margin-bottom: 1.1rem;
}

.frag-word {
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.035em;
  font-size: clamp(2.4rem, 12vw, 10rem);
  margin: 0;
  white-space: nowrap;
}

.fragment.accent .frag-word { color: var(--accent); }

.frag-note {
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.4vw, 0.95rem);
  letter-spacing: 0.04em;
  max-width: 34ch;
  margin-top: 1.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  opacity: var(--muted-op);
  line-height: 1.55;
}

/* fragments as essay links */
a.fragment {
  text-decoration: none;
  color: inherit;
  outline: none;
}

a.fragment:hover .frag-word,
a.fragment:focus-visible .frag-word { color: var(--accent); }

a.fragment.accent:hover .frag-word,
a.fragment.accent:focus-visible .frag-word { opacity: 0.75; }

a.fragment:hover .frag-index,
a.fragment:focus-visible .frag-index { opacity: 1; color: var(--accent); }

/* scroll-reveal, JS-driven, opt-in only when motion is allowed */
.js-animate .fragment {
  opacity: 0;
  transform: translateY(2.5rem);
}

.js-animate .fragment.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s cubic-bezier(.16, .8, .24, 1), transform 0.9s cubic-bezier(.16, .8, .24, 1);
}

/* ---------- essays (editorial) ----------
   A deliberate break from the poster system: a quiet, centered title page
   in a serif face, a drop cap, and a dot-trail instead of the huge
   uppercase display type used everywhere else on the site. */

.essay-head {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(3.5rem, 10vw, 7rem) var(--pad-x) clamp(2.2rem, 6vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.essay-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 1.8rem;
}

.essay-eyebrow .essay-count { color: var(--accent); opacity: 1; }

.essay-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.02;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  margin: 0;
}

.essay-title .dot { color: var(--accent); font-style: normal; }

.essay-dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 42ch;
  margin: 1.4rem auto 0;
  opacity: var(--muted-op);
  line-height: 1.6;
}

.essay-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 2.2rem 0 0;
}

.essay-dots a {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--rule);
  transition: background 0.15s ease, transform 0.15s ease;
}

.essay-dots a:hover,
.essay-dots a:focus-visible,
.essay-dots a.is-current {
  background: var(--accent);
  transform: scale(1.35);
}

.page.essay {
  max-width: 640px;
  font-family: var(--serif);
}

.essay p {
  font-size: 1.16rem;
  line-height: 1.85;
}

.essay p:first-of-type::first-letter {
  float: left;
  font-style: italic;
  font-size: 3.6em;
  line-height: 0.82;
  padding: 0.03em 0.09em 0 0;
  color: var(--accent);
}

/* Punch line — a one-sentence paragraph lifted out of the flow for rhythm.
   Large italic serif, echoing the title, with air above and below so the eye
   lands on it. Kept off the first paragraph so the drop cap stays put. */
.essay p.punch {
  font-style: italic;
  font-size: clamp(1.5rem, 3.8vw, 2.15rem);
  line-height: 1.26;
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin: 2.6rem 0;
  color: var(--ink);
}

.essay p.punch.right {
  margin-left: auto;
  text-align: right;
}

/* If a punch opens the essay, it owns the entrance — no drop cap fighting it. */
.essay p.punch:first-of-type::first-letter {
  float: none;
  font-size: inherit;
  line-height: inherit;
  padding: 0;
  color: inherit;
}

.essay p.punch:first-of-type {
  margin-top: 0;
}

/* Highlighted sentence — a highlighter stroke in the accent, sitting behind
   the text so it survives line wraps. Subtle in both themes. */
.essay .hi {
  background: linear-gradient(
    transparent 58%,
    color-mix(in srgb, var(--accent) 22%, transparent) 58%
  );
  padding: 0 0.02em;
}

/* Nostr highlights (NIP-84) — reuses the .hi highlighter-stroke language but
   interactive: a hairline dotted underline and pointer cursor signal it can
   be hovered, and the stroke deepens slightly to answer that affordance. */
.essay .n-highlight {
  background: linear-gradient(
    transparent 58%,
    color-mix(in srgb, var(--accent) 26%, transparent) 58%
  );
  color: inherit;
  padding: 0 0.02em;
  cursor: pointer;
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 55%, transparent);
  transition: background 0.15s ease;
}

.essay .n-highlight:hover,
.essay .n-highlight:focus-visible {
  background: linear-gradient(
    transparent 58%,
    color-mix(in srgb, var(--accent) 40%, transparent) 58%
  );
  outline: none;
}

.n-hl-tooltip {
  position: absolute;
  z-index: 200;
  transform: translate(-50%, -100%);
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 0.5rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.n-hl-tooltip.is-visible { opacity: 1; visibility: visible; }

.n-hl-tip-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.n-hl-tip-avatar {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  flex-shrink: 0;
}

.n-hl-tip-time {
  margin-top: 0.25rem;
  opacity: 0.5;
}

.n-hl-toolbar {
  position: absolute;
  z-index: 200;
  transform: translateX(-50%);
  appearance: none;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 0.4rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.n-hl-toolbar:hover { background: var(--accent); }
.n-hl-toolbar:disabled { opacity: 0.6; cursor: default; background: var(--ink); }

.n-auth {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  appearance: none;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 0.5rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  max-width: 12rem;
}

.n-auth span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.n-auth:hover { border-color: var(--accent); color: var(--accent); }

.n-auth.is-signed-in { text-transform: none; letter-spacing: 0.02em; }

.n-auth-avatar {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .n-auth { right: 0.8rem; bottom: 0.8rem; }
}

.essay-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.essay-nav a {
  text-decoration: none;
  border-bottom: none;
  opacity: 0.6;
}

.essay-nav a:hover { opacity: 1; color: var(--accent); }

/* ---------- quiet section (homepage bio) ---------- */

.quiet {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) var(--pad-x) clamp(3rem, 8vw, 5rem);
}

.quiet p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 2.2rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin: 0 0 2.4rem;
  padding: 0;
  list-style: none;
}

.stack li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.1rem;
}

.stack .tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  opacity: 0.55;
  flex: 0 0 5.5ch;
}

.stack .desc { font-size: 0.98rem; line-height: 1.6; }
.stack .desc a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.stack .desc a:hover { border-bottom-color: var(--accent); }

.where {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.where a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.where a:hover { border-bottom-color: var(--accent); }

/* ---------- /stuff ---------- */

.proj-name {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.stuff-section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
  margin: 3rem 0 1.2rem;
}

/* featured section breaks out of the .page column width */

.featured-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad-x) 0;
}

.featured-wrap .stuff-section-label { margin-top: 0; }

.stuff-more {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.stuff-card.entry {
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 1.2rem 1.4rem;
  transition: border-color 0.15s ease;
}

.stuff-card.entry:hover,
.stuff-card.entry:focus-visible {
  border-color: var(--accent);
}

.stuff-more .entry-title { font-size: 1rem; }

.stuff-more .entry-sub { font-size: 0.85rem; }

/* featured: portrait cards with icon + richer copy.
   auto-fit + a fixed portrait aspect-ratio means the column count is
   purely a function of available width, not a hand-picked breakpoint. */

.stuff-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.1rem;
}

.stuff-featured .stuff-card.entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  aspect-ratio: 3 / 4;
  padding: 1.7rem 1.6rem 1.5rem;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}

.card-icon {
  display: block;
  width: 1.85rem;
  height: 1.85rem;
  color: var(--ink);
  opacity: 0.88;
  flex-shrink: 0;
}

.card-icon svg { width: 100%; height: 100%; display: block; }

.stuff-featured .entry-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-slogan {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.stuff-featured .entry-sub {
  font-size: 0.86rem;
  line-height: 1.55;
  margin-top: 0.7rem;
  opacity: var(--muted-op);
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.card-cta {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-top: 1.5rem;
  padding-top: 1rem;
  width: 100%;
  border-top: 1px solid var(--rule);
  flex-shrink: 0;
}

.stuff-card.entry:hover .card-cta,
.stuff-card.entry:focus-visible .card-cta {
  opacity: 1;
  color: var(--accent);
}

.stuff-card.entry:hover .card-icon,
.stuff-card.entry:focus-visible .card-icon {
  color: var(--accent);
  opacity: 1;
}

@media (max-width: 26em) {
  .stuff-featured .stuff-card.entry { aspect-ratio: auto; }
  .stuff-featured .entry-sub { -webkit-line-clamp: 8; }
}

.legacy-heading,
.stuff-grid li.legacy-heading {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
  border: none;
  border-bottom: none;
  padding: 2.4rem 0 0;
  margin-top: 0.5rem;
  font-style: normal;
}

/* legacy flat list variant */
.stuff-grid {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stuff-grid li {
  border-bottom: 1px solid var(--rule);
  padding: 1.3rem 0;
  font-size: 0.98rem;
  line-height: 1.65;
}

.stuff-grid li:last-child { border-bottom: none; }

.stuff-grid .proj-name {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.stuff-grid p { margin: 0.5rem 0; }

.stuff-grid a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.stuff-grid a:hover { border-bottom-color: var(--accent); }

/* ---------- /essays ---------- */

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

.essays-list li { border-bottom: 1px solid var(--rule); }
.essays-list li:last-child { border-bottom: none; }

.essays-list a {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  padding: 1.3rem 0;
  text-decoration: none;
}

.essays-list a:hover .essay-list-name,
.essays-list a:focus-visible .essay-list-name { color: var(--accent); }

.essay-list-index {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  opacity: 0.5;
  flex: 0 0 5ch;
}

.essay-list-body { min-width: 0; }

.essay-list-name {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
  transition: color 0.15s ease;
}

.essay-list-note {
  font-size: 0.92rem;
  line-height: 1.55;
  opacity: var(--muted-op);
  margin: 0;
}

@media (max-width: 30em) {
  .essays-list a { flex-direction: column; gap: 0.3rem; }
}

/* ---------- /feed ---------- */

.feed-list {
  display: flex;
  flex-direction: column;
}

.post {
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 0;
}

.post:last-child { border-bottom: none; }

.post-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.post-avatar {
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

.post-who {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  margin-right: auto;
}

.post-name {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-handle,
.post-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  opacity: 0.5;
}

.post-content {
  margin: 0 0 0.7rem;
  white-space: pre-wrap;
  font-size: 1.02rem;
  line-height: 1.65;
}

.post-foot {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.post-foot a { text-decoration: none; opacity: 0.5; border-bottom: none; }
.post-foot a:hover { opacity: 1; color: var(--accent); }

.post.is-clickable { cursor: pointer; }

.post.is-clickable:hover,
.post.is-clickable:focus-visible {
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.post.is-clickable:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

/* thread panel reuses .post cards for OP + replies, Twitter-style */
.thread-panel .feed-list .post { padding: 1rem 0; }
.thread-panel .feed-list .post:first-child { padding-top: 0; }

.thread-status {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  opacity: 0.5;
  padding: 1.2rem 0;
}

/* ---------- /podcast ---------- */

.podcast-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.podcast-card {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1.1rem;
  border: 1px solid var(--rule);
  padding: 1.1rem 1.3rem;
  transition: border-color 0.15s ease;
}

.podcast-card:hover { border-color: var(--accent); }

.podcast-art {
  width: 6rem;
  height: 6rem;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  align-self: start;
}

.podcast-body { min-width: 0; }

.podcast-title {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.15rem;
}

.podcast-meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  opacity: 0.5;
  margin-bottom: 0.6rem;
}

.podcast-quote {
  font-size: 0.94rem;
  line-height: 1.6;
  margin: 0 0 0.6rem;
  opacity: var(--muted-op);
}

.podcast-quote + .podcast-quote { margin-top: -0.3rem; }

.podcast-listen {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-bottom: none;
  opacity: 0.6;
}

.podcast-listen:hover { opacity: 1; color: var(--accent); }

@media (max-width: 34em) {
  .podcast-card { grid-template-columns: 1fr; }
  .podcast-art { width: 100%; height: 10rem; }
}

/* ---------- /nownownow changelog ---------- */

.changelog-content {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad-x) clamp(3rem, 8vw, 5rem);
}

.year-heading {
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1;
  margin: 3.5rem 0 0.5rem;
  border-bottom: none;
}

.year-block:first-child .year-heading { margin-top: 0; }

.month-heading {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
  margin: 2.2rem 0 0.4rem;
}

.entries {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.entry {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule);
  margin: 0;
  padding: 1rem 0;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
  color: inherit;
  cursor: pointer;
}

.entries .entry:last-child { border-bottom: none; }

.entry:hover .entry-title,
.entry:focus-visible .entry-title { color: var(--accent); }

.entry:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.entry-date {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.3rem;
}

.entry-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.entry-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: var(--muted-op);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.stuff-card .entry-sub { white-space: normal; }

/* detail panel (js-driven) */

.detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 90;
}

.detail-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.detail-panel {
  position: fixed;
  z-index: 100;
  background: var(--bg);
  color: var(--ink);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.3s cubic-bezier(.16, .8, .24, 1);
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.detail-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
}

.detail-close {
  appearance: none;
  background: none;
  border: 1px solid var(--rule);
  color: inherit;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.detail-close:hover { border-color: var(--accent); color: var(--accent); }

.detail-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 0 0 1rem;
}

.detail-body p {
  font-size: 0.98rem;
  line-height: 1.7;
  margin: 0 0 1.2rem;
}

.detail-body a { border-bottom: 1px solid var(--rule); text-decoration: none; }
.detail-body a:hover { border-bottom-color: var(--accent); }

.detail-body .why,
.changelog .why {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.65;
  opacity: var(--muted-op);
  border-top: 1px solid var(--rule);
  padding-top: 0.9rem;
  font-style: normal;
}

body.panel-open { overflow: hidden; }

body.panel-open .timeline-nav { display: none; }

/* wide viewport: slide-in panel from the right */
@media (min-width: 46em) {
  .detail-panel {
    top: 0;
    right: 0;
    bottom: 0;
    width: 32em;
    max-width: 92vw;
    padding: 2rem clamp(1.25rem, 3vw, 2rem) 3rem;
    border-left: 1px solid var(--rule);
    transform: translateX(100%);
  }

  .detail-panel.open { transform: translateX(0); }
}

/* narrow viewport: bottom sheet */
@media (max-width: 46em) {
  .detail-panel {
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    padding: 1.4rem 1.2rem 2.4rem;
    border-top: 1px solid var(--rule);
    transform: translateY(100%);
  }

  .detail-panel.open { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .detail-panel, .detail-backdrop, .stuff-card.entry { transition: none; }
}

/* floating timeline nav (js-driven, /nownownow only) */

.timeline-nav {
  position: fixed;
  top: 50%;
  right: 1.5em;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-align: right;
  max-height: 80vh;
  overflow-y: auto;
}

.timeline-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-nav .tl-year {
  font-weight: 700;
  margin-top: 0.7em;
  cursor: default;
  opacity: 0.45;
}

.timeline-nav .tl-year.active {
  opacity: 1;
  color: var(--accent);
}

.timeline-nav .tl-months {
  list-style: none;
  margin: 0.2em 0 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.timeline-nav .tl-year.active + .tl-months { max-height: 20em; }

.timeline-nav .tl-months a {
  display: block;
  padding: 0.15em 0;
  opacity: 0.5;
  text-decoration: none;
}

.timeline-nav .tl-months a.active {
  opacity: 1;
  font-weight: 700;
}

@media (max-width: 60em) {
  .timeline-nav { display: none; }
}

/* ---------- footer ---------- */

body > footer {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding: 1.6rem var(--pad-x) 2.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

footer .nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  text-transform: uppercase;
  margin: 0;
}

footer .nav a { text-decoration: none; opacity: 0.65; }
footer .nav a:hover { opacity: 1; color: var(--accent); }

footer .colophon { opacity: 0.45; }
footer .colophon a { text-decoration: none; }

@media (max-width: 520px) {
  .stack li { flex-direction: column; gap: 0.35rem; }
  .stack .tag { flex: none; }
}

/* ── essay popup modal: stuff cards with data-essay (Trellis → Receipts) open ── */
/* their <template> as a centered, essay-styled popup instead of the side sheet.  */
.essay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 200;
}
.essay-backdrop.open { opacity: 1; visibility: visible; }

.essay-modal {
  position: fixed;
  z-index: 210;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -47%);
  width: min(44em, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.24s cubic-bezier(.16, .8, .24, 1), visibility 0.22s ease;
}
.essay-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

.essay-modal-doc {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(1.6rem, 4vw, 2.8rem) clamp(1.3rem, 4vw, 3rem) clamp(2rem, 5vw, 3rem);
}

.essay-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  appearance: none;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: inherit;
  font-family: var(--mono);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
  transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.essay-close:hover,
.essay-close:focus-visible { border-color: var(--accent); color: var(--accent); opacity: 1; }

body.essay-open { overflow: hidden; }

/* essay typography inside the modal (mirrors the /attention/ essay pages) */
.essay-doc-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: var(--muted-op);
  margin-bottom: 0.9rem;
}
.essay-doc-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 1.2rem + 3vw, 2.7rem);
  line-height: 1.02;
  margin: 0 0 0.6rem;
}
.essay-doc-title .dot { color: var(--accent); }
.essay-doc-dek {
  font-size: 1.05rem;
  line-height: 1.5;
  opacity: 0.82;
  margin: 0 0 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--rule);
}
.essay-modal-doc p {
  font-size: 1rem;
  line-height: 1.72;
  margin: 0 0 1.2rem;
}
.essay-modal-doc .hi {
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 26%, transparent) 0);
  padding: 0 0.04em;
}
.essay-modal-doc .punch {
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}
.essay-doc-more {
  font-family: var(--mono);
  font-size: 0.82rem;
  opacity: var(--muted-op);
  margin-top: 1.6rem !important;
}
.essay-modal-doc a { border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.essay-modal-doc a:hover { border-bottom-color: var(--accent); color: var(--accent); }

@media (max-width: 46em) {
  .essay-modal {
    width: 100vw;
    max-height: 92vh;
    top: auto;
    bottom: 0;
    left: 0;
    transform: translateY(8%);
    border-radius: 14px 14px 0 0;
  }
  .essay-modal.open { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .essay-modal { transition: opacity 0.2s ease, visibility 0.2s ease; transform: translate(-50%, -50%); }
  .essay-modal.open { transform: translate(-50%, -50%); }
}
