.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-2);
}

.post-meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--ink);
  transition: color 0.25s ease;
}

.post-meta a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 6px;
}

.post-meta i {
  font-size: 16px;
  color: var(--red);
}

html.motion .post-meta {
  animation: page-rise 0.7s var(--ease) 0.12s backwards;
}

.post {
  padding: clamp(32px, 4vw, 56px) 0 clamp(80px, 8vw, 120px);
}

.post-grid {
  display: grid;
  grid-template-columns: minmax(0, 272px) minmax(0, 720px);
  grid-template-areas: "side cover" "side body" "side faq" "side services";
  align-items: start;
  gap: 40px clamp(48px, 7vw, 120px);
}

@media (min-width: 1600px) {
  .post-grid {
    grid-template-columns: minmax(0, 272px) minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr) minmax(0, 272px);
    grid-template-areas: "side . cover . ." "side . body . ." "side . faq . ." "side . services . .";
    column-gap: 0;
  }
}

.post-cover {
  position: relative;
  display: block;
  grid-area: cover;
  overflow: hidden;
  aspect-ratio: 2.4;
  border-radius: var(--radius);
  background: var(--paper-2);
}

.post-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html.motion .post-cover {
  animation: page-rise 0.7s var(--ease) 0.18s backwards;
}

.post-side {
  grid-area: side;
  position: sticky;
  top: calc(var(--header) + 24px);
}

.post-body {
  grid-area: body;
  min-width: 0;
}

.post-faq {
  grid-area: faq;
  min-width: 0;
  margin-top: 16px;
}

.post-faq-title {
  margin-bottom: 20px;
  font-size: clamp(22px, 1vw + 14px, 25px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header) + 24px);
}

.post-faq-title:focus {
  outline: 0;
}

.content.post-body > p:first-child {
  font-size: 1.12em;
  line-height: 1.6;
  color: var(--ink);
}

.post-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}

.post-toc summary::-webkit-details-marker {
  display: none;
}

.post-toc summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0 4px 4px 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.5;
  rotate: 45deg;
  transition: rotate 0.25s var(--ease), margin 0.25s var(--ease);
}

.post-toc[open] summary::after {
  margin: 4px 4px 0 0;
  rotate: 225deg;
}

.post-toc ol {
  margin-top: 14px;
  border-left: 1px solid var(--line);
}

.post-toc a {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 6px 0 6px 16px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-2);
  transition: color 0.2s ease;
}

.post-toc a::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: -1px;
  width: 2px;
  border-radius: 2px;
  background: var(--red);
  scale: 1 0;
  transition: scale 0.25s var(--ease);
}

.post-toc a.is-on {
  color: var(--ink);
}

.post-toc a.is-on::before {
  scale: 1 1;
}

.post-toc ol ol {
  display: none;
  margin: 0 0 6px;
  border-left: 0;
}

.post-toc li.is-open > ol {
  display: block;
}

.post-toc ol ol a {
  padding: 4px 0 4px 44px;
  font-size: 13px;
}

.post-toc-no {
  flex: none;
  min-width: 1.5em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.content.post-body :is(h1, h2, h3, h4):focus {
  outline: 0;
}

.post-services {
  grid-area: services;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 24px;
  margin-top: 16px;
  padding: var(--pad);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
}

.post-services-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 440px;
}

.post-services-label {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
}

.post-services-title {
  font-size: var(--h3);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.post-services-copy p:last-child {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.66);
  text-wrap: pretty;
}

.post-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
  color: rgba(255, 255, 255, 0.86);
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease, scale 0.15s var(--ease);
}

html.motion .post-chips a:active {
  scale: 0.97;
}

.post-chips i {
  font-size: 15px;
}

.post-chips i:last-child {
  font-size: 12px;
  opacity: 0.5;
  transition: opacity 0.3s ease, translate 0.3s var(--ease);
}

.post-case {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.post-case a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  color: var(--paper);
}

.post-case span {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
}

.post-case i {
  font-size: 14px;
  transition: translate 0.3s var(--ease);
}

.post-case a:focus-visible {
  outline-offset: 6px;
  border-radius: 8px;
}

.post-case a:focus-visible span {
  color: rgba(255, 255, 255, 0.86);
}

html.motion .post-case a:focus-visible i {
  translate: 3px 0;
}

.post-services-mark {
  position: absolute;
  right: -56px;
  bottom: -72px;
  z-index: -1;
  width: 260px;
  height: 260px;
  fill: none;
  stroke: rgba(255, 25, 72, 0.4);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.post-services-mark path:nth-child(2) {
  stroke: rgba(255, 25, 72, 0.25);
}

.post-services-mark path:nth-child(3) {
  stroke: rgba(255, 25, 72, 0.14);
}

.post-more {
  padding-bottom: var(--section);
}

.post-more-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.post-more-head .btn {
  flex: none;
}

.post-more-head .h2 {
  font-size: clamp(24px, 2.2vw, 32px);
}

@media (hover: hover) and (pointer: fine) {
  .post-meta a:hover {
    color: var(--red-text);
  }

  .post-toc a:hover {
    color: var(--ink);
  }

  .post-chips a:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: #202023;
    color: var(--paper);
  }

  .post-chips a:hover i:last-child {
    opacity: 1;
  }

  html.motion .post-chips a:hover i:last-child {
    translate: 2px -2px;
  }

  .post-case a:hover span {
    color: rgba(255, 255, 255, 0.86);
  }

  html.motion .post-case a:hover i {
    translate: 3px 0;
  }
}

@media (pointer: coarse) {
  .post-toc a {
    align-items: center;
    min-height: 44px;
  }

  .post-meta a {
    min-height: 44px;
  }

  .post-chips a,
  .post-case a {
    min-height: 44px;
  }
}

@media (min-width: 1024px) {
  .post-side {
    max-height: calc(100svh - var(--header) - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .post-toc summary {
    pointer-events: none;
  }

  .post-toc summary::after {
    display: none;
  }

  .post-toc a:focus-visible {
    outline-offset: -2px;
    border-radius: 8px;
  }
}

@media (max-width: 1023px) {
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "cover" "side" "body" "faq" "services";
    gap: 24px;
  }

  .post-side {
    position: static;
  }

  .post-body {
    margin-top: 8px;
  }

  .post-services {
    margin-top: 32px;
  }

  .post-toc {
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .post-toc summary {
    min-height: 48px;
    font-size: 14px;
  }

  .post-toc ol {
    margin: 0 0 16px;
  }
}

@media (max-width: 767px) {
  .page-head.is-doc.post-head .page-title {
    font-size: 30px;
    line-height: 1.1;
  }

  .post-cover {
    aspect-ratio: 2 / 1;
  }

  .post-services-mark {
    right: -80px;
    bottom: -96px;
    width: 220px;
    height: 220px;
  }

  .post-more-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .post-more-head .btn {
    width: auto;
  }
}

@media print {
  html:has(main[data-page="post"]) :is(.header, .footer, .fab, .cookie, .bar, .post-side, .post-cover, .post-services, .post-more, .cta, .skip),
  html:has(main[data-page="post"]) .page-head::before {
    display: none;
  }

  .post-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "body" "faq";
  }

  .content .faq-item::details-content {
    content-visibility: visible;
    height: auto;
  }
}
