:is(.social-page, .social-feed) {
  --social-panel: #fff8f4;
  --social-line: #cba5b9;
  --social-deep: #30212c;
  --social-soft: #f3d5e3;
  --social-well: #f7e4ed;
  --social-profile-ink: #fbe3ee;
  --social-feed-width: 51rem;
}

.social-main {
  width: min(100% - var(--gutter) * 2, 75rem);
  margin-inline: auto;
  padding-block: clamp(1.55rem, 3.5vw, 3.25rem) clamp(3.1rem, 7.5vw, 7rem);
}

.social-masthead {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13.5rem, .4fr);
  align-items: end;
  gap: .95rem clamp(1.2rem, 5vw, 4rem);
  padding: clamp(1.45rem, 5.6vw, 5.25rem);
  padding-block: clamp(1.45rem, 3.2vw, 3.1rem);
  border: 1px solid var(--ink);
  background: var(--social-deep);
  color: var(--cream);
  box-shadow: .375rem .375rem 0 var(--ink);
}

.social-masthead::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: radial-gradient(circle, color-mix(in srgb, var(--lime) 43%, transparent) 1px, transparent 1.6px) 0 0 / 7px 7px;
  mask-image: radial-gradient(ellipse 45% 88% at 96% 4%, black, transparent 83%);
  pointer-events: none;
}

.social-masthead::after {
  position: absolute;
  z-index: -1;
  inset: auto 0 0 auto;
  width: min(41%, 25rem);
  height: .4rem;
  content: "";
  background: repeating-linear-gradient(-48deg, transparent 0 9px, color-mix(in srgb, var(--lime) 45%, transparent) 9px 13px, transparent 13px 19px);
  pointer-events: none;
}

.social-heading {
  color: var(--lime);
  font: 900 italic clamp(4.15rem, 12vw, 10rem)/.81 var(--display);
  letter-spacing: -.042em;
  text-transform: uppercase;
}

.social-deck {
  max-width: 43ch;
  margin: .78rem 0 0;
  font-size: clamp(.98rem, 1.45vw, 1.19rem);
  line-height: 1.52;
}

.social-profile {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: clamp(.7rem, 1.7vw, 1.25rem);
  min-width: 0;
  min-height: 6rem;
  padding-inline-start: clamp(.8rem, 2.45vw, 2rem);
  border-inline-start: 1px solid color-mix(in srgb, var(--lime) 57%, transparent);
}

.social-profile strong {
  display: block;
  color: var(--cream);
  font: 900 italic clamp(1.5rem, 3vw, 2.55rem)/.94 var(--display);
}

.social-profile p {
  margin: .3rem 0 0;
  color: var(--social-profile-ink);
  font-size: .91rem;
  line-height: 1.38;
}

.social-avatar {
  display: block;
  flex: 0 0 auto;
  width: 2.85rem;
  height: auto;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--social-soft);
  object-fit: cover;
  object-position: center 36%;
}

.social-avatar img { width: 100%; height: 100%; object-fit: inherit; object-position: inherit; }
.social-profile .social-avatar {
  width: clamp(3.5rem, 6.7vw, 5.6rem);
  border-color: var(--lime);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--lime) 23%, transparent);
}

.social-controls {
  display: grid;
  grid-template-columns: minmax(13rem, 1.12fr) minmax(0, 1fr);
  align-items: end;
  gap: .86rem clamp(.85rem, 2.6vw, 2rem);
  margin-block: clamp(1.65rem, 2.7vw, 2.4rem) 0;
  padding: clamp(.85rem, 2vw, 1.35rem);
  border: 1px solid var(--ink);
  background: color-mix(in srgb, var(--social-panel) 80%, var(--social-soft));
}

.social-search,
.social-filter {
  display: grid;
  gap: .38rem;
  min-width: 0;
}

label.social-search,
.social-filters label {
  color: var(--social-deep);
  font: 700 .75rem/1.3 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.social-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .58rem;
  min-width: 0;
}

.social-search input,
.social-filters select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: .59rem .74rem;
  color: var(--ink);
  background-color: var(--social-panel);
  font: 600 1rem/1.2 var(--sans);
  text-transform: none;
}

.social-search input::placeholder { color: var(--muted); font-weight: 400; opacity: 1; }

.social-filters select {
  appearance: none;
  padding-inline-end: 1.99rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 51%), linear-gradient(135deg, var(--ink) 50%, transparent 51%);
  background-position: calc(100% - 1.1rem) 52%, calc(100% - .78rem) 52%;
  background-size: .34rem .34rem;
  background-repeat: no-repeat;
  cursor: pointer;
  text-overflow: ellipsis;
}

.social-results {
  width: min(100%, var(--social-feed-width));
  margin: 1.15rem auto .75rem;
  color: var(--muted);
  font: 700 .76rem/1.4 var(--mono);
}

.social-feed {
  position: relative;
  display: grid;
  gap: clamp(1.1rem, 2.8vw, 2rem);
  width: min(100%, var(--social-feed-width));
  margin: 0 auto;
  padding: 0 0 0 1.8rem;
  list-style: none;
}

.social-feed::before {
  position: absolute;
  inset: 1.65rem auto 1.6rem .45rem;
  width: 1px;
  content: "";
  background: var(--social-line);
  pointer-events: none;
}

.social-post {
  position: relative;
  min-width: 0;
  padding: clamp(.85rem, 2.7vw, 1.55rem);
  border: 1px solid var(--ink);
  background: var(--social-panel);
  box-shadow: .23rem .25rem 0 #b87a984d;
  overflow-wrap: anywhere;
}
.social-post:target { outline: 2px solid var(--ink); outline-offset: 4px; }

.social-post::before {
  position: absolute;
  top: 1.4rem;
  left: -1.75rem;
  width: .7rem;
  aspect-ratio: 1;
  content: "";
  border: 1px solid var(--ink);
  background: var(--lime);
  transform: rotate(45deg);
}

.social-post-head {
  display: flex;
  align-items: center;
  gap: .64rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--social-line);
}

.social-post-author {
  display: grid;
  justify-items: start;
  gap: .13rem;
  min-width: 0;
  line-height: 1.2;
}

.social-post-author strong { font-size: 1rem; line-height: 1.12; }
.social-post-author :is(span, small),
.social-profile :is(span, small) {
  color: var(--muted);
  font: 400 .75rem/1.25 var(--mono);
}
.social-profile :is(span, small) { color: var(--social-profile-ink); }

.social-post-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .26rem .63rem;
  min-width: 0;
  margin-inline-start: auto;
  color: var(--muted);
  font: 700 .73rem/1.32 var(--mono);
  text-align: end;
}

.social-post-meta time { white-space: nowrap; }
.social-post-meta a { text-decoration-thickness: 1px; text-underline-offset: .19em; }
.social-post-meta a:hover { color: var(--ink); }

.social-post-body {
  margin-block: clamp(.8rem, 1.8vw, 1.2rem);
  font-size: clamp(.98rem, 1.28vw, 1.075rem);
  line-height: 1.56;
}

.social-post-body > * { margin: 0; }
.social-post-body > * + * { margin-block-start: .62rem; }
.social-post-body ol { padding-inline-start: 2.05em; }
.social-post-body ol > li { padding-inline-start: .14em; }
.social-post-body ol li::marker { font-variant-numeric: tabular-nums; }

.social-attachments {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(.5rem, 1.42vw, .88rem);
  margin-block: .85rem 0;
}

.social-attachments:has(> :nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.social-attachment { display: grid; align-content: start; min-width: 0; }

.social-attachment > a {
  display: block;
  overflow: hidden;
  background: var(--social-well);
}

.social-attachment :is(img, video) {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(69svh, 37rem);
  border: 1px solid var(--social-line);
  background: var(--social-well);
  object-fit: contain;
}

.social-attachment > a > img { background: transparent; }
.social-attachment--portrait { justify-self: center; width: min(100%, 24rem); }
.social-attachment:has(video) { grid-column: 1 / -1; width: 100%; }
.social-attachment video { width: auto; max-width: 100%; margin-inline: auto; background: var(--social-deep); }
.social-attachment--portrait video { width: min(100%, 21rem, 35svh); aspect-ratio: 9 / 16; }
.social-attachment--square video { width: min(100%, 31rem, 65svh); aspect-ratio: 1; }
.social-attachments:has(> :nth-child(2)) .social-attachment img { aspect-ratio: 1; }
.social-attachments:has(> :nth-child(2)) .social-attachment--landscape video { width: 100%; }

.social-attachments--square-pair .social-attachment { grid-column: auto; }
.social-attachments--square-pair .social-attachment :is(img, video) {
  width: 100%;
  max-height: none;
  aspect-ratio: 1;
}

.social-attachment figcaption {
  padding: .38rem .14rem 0;
  color: var(--muted);
  font: 700 .74rem/1.38 var(--mono);
}

.social-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .37rem;
  margin: .8rem 0 0;
  padding: 0;
  list-style: none;
}

.social-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: .18rem .5rem;
  border: 1px solid var(--social-line);
  color: #4e263e;
  background: var(--social-soft);
  font: 700 .73rem/1.3 var(--mono);
}

:is(button, a).social-tag { min-height: 44px; cursor: pointer; }
:is(button, a).social-tag:is(:hover, [aria-pressed="true"]) { border-color: var(--ink); background: var(--lime); color: var(--ink); }

.social-empty {
  width: min(100%, var(--social-feed-width));
  margin: .85rem auto 0;
  padding: 1.6rem;
  border: 1px dashed var(--ink);
  background: var(--social-panel);
  text-align: center;
}

@media (max-width: 760px) {
  .social-masthead { grid-template-columns: minmax(0, 1fr); }
  .social-profile { grid-area: auto; min-height: auto; padding: .85rem 0 0; border-inline-start: 0; border-top: 1px solid color-mix(in srgb, var(--lime) 44%, transparent); }
  .social-controls { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .social-main { width: calc(100% - var(--gutter) * 2); }
  .social-masthead { gap: .8rem; padding: 1.35rem 1rem 1.12rem; box-shadow: .25rem .25rem 0 var(--ink); }
  .social-heading { font-size: clamp(3.75rem, 19vw, 6rem); }
  .social-deck { margin-top: .6rem; }
  .social-profile .social-avatar { width: 3.1rem; }
  .social-feed { padding-inline-start: 0; }
  .social-feed::before, .social-post::before { content: none; }
  .social-post { padding: .78rem; }
  .social-post-head { gap: .45rem; }
  .social-post-head .social-avatar { width: 2.45rem; }
  .social-post-author strong { font-size: .94rem; }
  .social-post-meta { display: grid; justify-items: end; gap: .18rem; font-size: .67rem; }
  .social-post-body { margin-block: .75rem; }
  .social-attachment :is(img, video) { max-height: min(66svh, 29rem); }
  .social-attachments--square-pair:has(> :nth-child(2)) { grid-template-columns: minmax(0, 1fr); }
  .social-attachment figcaption { padding-inline: 0; font-size: .68rem; }
}

@media (max-width: 350px) {
  .social-page .masthead nav { flex-wrap: wrap; column-gap: 1.05rem; }
  .social-post-head { flex-wrap: wrap; }
}
