body.mgf-post-page,
body.mgf-post-page.text-ui-dark,
body.mgf-post-page.text-ui-light {
  background: var(--mgf-color-bg);
  color: var(--mgf-color-text);
  margin: 0;
  font-family: var(--mgf-font-family-base);
}

body.mgf-post-page h1,
body.mgf-post-page h2,
body.mgf-post-page h3 {
  color: var(--mgf-color-text);
}

.mgf-post {
  min-height: 70vh;
  padding: var(--mgf-space-5) 0 var(--mgf-space-8);
  background: var(--mgf-color-bg);
  color: var(--mgf-color-text);
  font-family: var(--mgf-font-family-base);
}

.mgf-post__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
  grid-template-areas:
    "crumbs crumbs"
    "main aside";
  gap: var(--mgf-space-5);
  max-width: var(--mgf-container);
  margin: 0 auto;
  padding: 0 var(--mgf-space-4);
}

.mgf-post__crumbs {
  grid-area: crumbs;
}

.mgf-post__crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mgf-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--mgf-color-text-muted);
  font-size: 0.85rem;
}

.mgf-post__crumbs li {
  display: flex;
  align-items: center;
  gap: var(--mgf-space-2);
}

.mgf-post__crumbs li + li::before {
  content: "›";
  color: var(--mgf-color-text-muted);
}

.mgf-post__crumbs a {
  color: var(--mgf-color-text-muted);
  text-decoration: none;
}

.mgf-post__crumbs a:hover {
  color: var(--mgf-color-accent);
}

.mgf-post__crumbs [aria-current="page"] {
  color: var(--mgf-color-text);
}

.mgf-post__main {
  grid-area: main;
}

.mgf-post__aside {
  grid-area: aside;
}

.mgf-post__main,
.mgf-post__aside {
  display: grid;
  gap: var(--mgf-space-5);
  align-content: start;
  min-width: 0;
}

.mgf-post__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mgf-space-2);
  margin-bottom: var(--mgf-space-4);
}

.mgf-post__chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 var(--mgf-space-3);
  border-radius: 999px;
  background: var(--mgf-color-bg-elevated);
  color: var(--mgf-color-accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.mgf-post__chip[data-tone="1"] {
  color: var(--mgf-color-danger);
}

.mgf-post__chip[data-tone="2"] {
  color: var(--mgf-color-success);
}

.mgf-post__chip[data-tone="3"] {
  color: color-mix(in srgb, var(--mgf-color-success) 55%, var(--mgf-color-accent));
}

.mgf-post__chip[data-tone="4"] {
  color: color-mix(in srgb, var(--mgf-color-danger) 40%, var(--mgf-color-text));
}

.mgf-post__chip[data-tone="5"] {
  color: color-mix(in srgb, var(--mgf-color-success) 65%, var(--mgf-color-text));
}

.mgf-post__date {
  display: inline-flex;
  align-items: center;
  gap: var(--mgf-space-2);
  margin-left: auto;
  color: var(--mgf-color-text-muted);
  font-size: 0.8rem;
}

.mgf-post__date svg {
  width: 1rem;
  height: 1rem;
}

.mgf-post__heading {
  margin: 0 0 var(--mgf-space-3);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.mgf-post__lead {
  margin: 0 0 var(--mgf-space-5);
  color: var(--mgf-color-text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.mgf-post__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mgf-space-3);
  padding-bottom: var(--mgf-space-5);
  border-bottom: 1px solid var(--mgf-color-border);
}

.mgf-post__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--mgf-color-bg-elevated);
}

.mgf-post__byline-copy {
  flex: 1 1 8rem;
  min-width: 0;
}

.mgf-post__author,
.mgf-post__stats {
  margin: 0;
}

.mgf-post__author {
  font-size: 0.9rem;
  font-weight: 700;
}

.mgf-post__stats {
  color: var(--mgf-color-text-muted);
  font-size: 0.8rem;
}

.mgf-post__share {
  display: flex;
  gap: var(--mgf-space-2);
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.mgf-post__share a {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--mgf-color-border);
  border-radius: 50%;
  color: var(--mgf-color-text-muted);
}

.mgf-post__share a:hover {
  border-color: var(--mgf-color-accent);
  color: var(--mgf-color-accent);
}

.mgf-post__share svg {
  width: 0.95rem;
  height: 0.95rem;
}

.mgf-post__figure {
  margin: var(--mgf-space-5) 0;
}

.mgf-post__figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--mgf-radius-lg);
}

.mgf-post__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mgf-space-2);
  margin: var(--mgf-space-6) 0 0;
  color: var(--mgf-color-text-muted);
  font-size: 0.8rem;
}

.mgf-post__tags a {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 var(--mgf-space-3);
  border-radius: 999px;
  background: var(--mgf-color-bg-elevated);
  color: var(--mgf-color-text);
  font-weight: 600;
  text-decoration: none;
}

.mgf-post__tags a:hover {
  color: var(--mgf-color-accent);
}

.mgf-post__bio {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--mgf-space-4);
  margin-top: var(--mgf-space-6);
  padding: var(--mgf-space-4);
  border: 1px solid var(--mgf-color-border);
  border-radius: var(--mgf-radius-lg);
  background: var(--mgf-color-bg-elevated);
}

.mgf-post__bio-name {
  margin: 0 0 var(--mgf-space-1);
  font-size: 1rem;
  font-weight: 800;
}

.mgf-post__bio p {
  margin: 0;
  color: var(--mgf-color-text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.mgf-post__bio .mgf-button {
  white-space: nowrap;
}

.mgf-post__aside > section {
  position: relative;
  padding: var(--mgf-space-4);
  border: 1px solid var(--mgf-color-border);
  border-radius: var(--mgf-radius-lg);
  background: var(--mgf-color-bg-elevated);
}
.mgf-post__aside * {
  max-width: 100%;
}

.mgf-post__aside h2 {
  margin: 0 0 var(--mgf-space-3);
  font-size: 1.05rem;
  font-weight: 800;
}

.mgf-post__aside h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.2em;
  margin-right: var(--mgf-space-2);
  border-radius: 2px;
  background: var(--mgf-color-accent);
  vertical-align: -0.2em;
}

.mgf-post__discord p {
  margin: 0 0 var(--mgf-space-4);
  color: var(--mgf-color-text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.mgf-post__discord h2 svg {
  width: 1.1rem;
  height: 1.1rem;
  margin-right: var(--mgf-space-1);
  vertical-align: -0.15em;
}

.mgf-post__discord .mgf-button {
  width: 100%;
  min-height: 2.75rem;
  flex-direction: row-reverse;
}

.mgf-post__discord .mgf-post__discord-tag {
  max-width: 5.5rem;
  margin: var(--mgf-space-3) 0 0 auto;
  color: var(--mgf-color-text);
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.15;
  text-align: right;
  transform: rotate(-8deg);
}

.mgf-post__aside-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--mgf-space-3);
  margin-bottom: var(--mgf-space-3);
}

.mgf-post__aside-head h2 {
  margin: 0;
}

.mgf-post__aside-head a {
  color: var(--mgf-color-accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.mgf-post__related-list {
  display: grid;
  gap: var(--mgf-space-4);
}

.mgf-post__cats ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mgf-post__cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mgf-space-3);
  padding: var(--mgf-space-3) 0;
  border-bottom: 1px solid var(--mgf-color-border);
  color: var(--mgf-color-text);
  font-size: 0.9rem;
  text-decoration: none;
}

.mgf-post__cats li:last-child a {
  border-bottom: 0;
  padding-bottom: 0;
}

.mgf-post__cats a span:last-child {
  color: var(--mgf-color-text-muted);
  font-size: 0.8rem;
}

.mgf-post__cats a:hover {
  color: var(--mgf-color-accent);
}

.mgf-post__promo {
  display: grid;
  min-height: 10rem;
  place-items: center;
  background:
    linear-gradient(115deg, transparent 58%, color-mix(in srgb, var(--mgf-color-accent) 18%, transparent) 58% 68%, transparent 68%),
    linear-gradient(145deg, var(--mgf-color-bg-elevated), var(--mgf-color-bg));
}

.mgf-post__promo p {
  max-width: 8rem;
  margin: 0;
  color: var(--mgf-color-text);
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  transform: rotate(-6deg);
}

.mgf-post .mgf-reading-comments--page {
  margin-top: 0;
  padding: var(--mgf-space-4);
  border: 1px solid var(--mgf-color-border);
  border-radius: var(--mgf-radius-lg);
  background: var(--mgf-color-bg-elevated);
}

.mgf-post .mgf-reading-comments--page .mgf-reading-comments__head h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.2em;
  margin-right: var(--mgf-space-2);
  border-radius: 2px;
  background: var(--mgf-color-accent);
  vertical-align: -0.2em;
}

.mgf-post__chip:focus-visible,
.mgf-post__crumbs a:focus-visible,
.mgf-post__share a:focus-visible,
.mgf-post__tags a:focus-visible,
.mgf-post__aside a:focus-visible,
.mgf-post__body a:focus-visible {
  outline: 2px solid var(--mgf-color-focus);
  outline-offset: 2px;
}

@media (max-width: 992px) {
  .mgf-post__layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "crumbs"
      "main"
      "aside";
  }
}

@media (max-width: 640px) {
  .mgf-post__date {
    margin-left: 0;
  }

  .mgf-post__share {
    margin-left: 0;
    width: 100%;
  }

  .mgf-post__bio {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mgf-post__bio .mgf-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .mgf-post__discord-tag {
    display: none;
  }
}
