/* Single post styles. */

body.single-post {
  --dw-post-anchor-offset: calc(92px + 1.5rem);
  overflow-x: clip;
}

@supports selector(html:has(body.single-post)) {
  html:has(body.single-post) {
    overflow-x: clip;
  }
}

.dw-post-page {
  background:
    linear-gradient(180deg, #f8fbff 0%, #ffffff 42%, #f7faff 100%);
}

.dw-post-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: calc(92px + clamp(3.25rem, 7vw, 5.5rem)) 0 clamp(3.4rem, 6vw, 5.25rem);
  background:
    radial-gradient(circle at 78% 12%, rgba(65, 209, 255, 0.2), transparent 22rem),
    radial-gradient(circle at 12% 95%, rgba(110, 70, 255, 0.13), transparent 24rem),
    linear-gradient(135deg, #fbfdff 0%, #eef5ff 58%, #f6f3ff 100%);
}

.dw-post-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 42%;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.82) 100%);
}

.dw-post-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(20rem, 0.78fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.dw-post-hero__content {
  max-width: 48rem;
  min-width: 0;
}

.dw-post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  margin-bottom: clamp(1.35rem, 2.5vw, 2rem);
  color: rgba(83, 98, 127, 0.84);
  font-size: 0.88rem;
  font-weight: 800;
}

.dw-post-back svg {
  width: 1rem;
  height: 1rem;
}

.dw-post-back:hover,
.dw-post-back:focus-visible {
  color: var(--color-accent);
}

.dw-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1.2rem;
}

.dw-post-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.3rem;
  padding: 0.48rem 0.74rem;
  border: 1px solid rgba(137, 119, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(83, 98, 127, 0.84);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 30px rgba(47, 116, 255, 0.07);
}

.dw-post-meta__item--strong {
  background: rgba(110, 70, 255, 0.1);
  color: var(--color-accent-violet);
}

.dw-post-meta svg {
  width: 0.96rem;
  height: 0.96rem;
  color: var(--color-accent);
}

.dw-post-hero h1 {
  max-width: 12.5ch;
  margin: 0 0 1.25rem;
  font-size: clamp(3rem, 6.4vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.dw-post-hero__excerpt {
  max-width: 40rem;
  margin: 0;
  color: rgba(34, 47, 82, 0.78);
  font-size: clamp(1.06rem, 1.5vw, 1.22rem);
  font-weight: 500;
  line-height: 1.68;
}

.dw-post-hero__media {
  position: relative;
  min-width: 0;
}

.dw-post-hero__media::before {
  content: "";
  position: absolute;
  inset: 9% -5% -7% 10%;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(65, 209, 255, 0.18), rgba(110, 70, 255, 0.2));
  filter: blur(26px);
  opacity: 0.72;
}

.dw-post-hero__media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.08 / 1;
  min-height: clamp(20rem, 32vw, 29rem);
  border: 1px solid rgba(137, 119, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(65, 209, 255, 0.13), rgba(110, 70, 255, 0.14)),
    #ffffff;
  box-shadow: 0 32px 70px rgba(16, 26, 55, 0.16);
}

.dw-post-hero__media-frame picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.dw-post-hero__image-link {
  display: flex;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.dw-post-hero__image-link:focus-visible {
  outline: 3px solid var(--color-accent-violet);
  outline-offset: -5px;
}

.dw-post-hero__media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.dw-post.category-resources .dw-post-hero__media-frame {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.dw-post.category-resources .dw-post-hero__media-frame picture,
.dw-post.category-resources .dw-post-hero__media-frame img {
  width: 100%;
  height: 100%;
}

body.dw-featured-theatre-open {
  overflow: hidden;
}

.dw-featured-theatre[hidden] {
  display: none;
}

.dw-featured-theatre {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: clamp(1rem, 3vw, 2rem);
  overflow: hidden;
  background: rgba(5, 9, 22, 0.92);
  opacity: 0;
  transition: opacity 180ms ease;
}

.dw-featured-theatre.is-open {
  opacity: 1;
}

.dw-featured-theatre__dialog {
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: min(100%, 90rem);
  height: min(100%, 90rem);
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  overflow: visible;
  outline: 0;
}

.dw-featured-theatre__image {
  display: block;
  box-sizing: border-box;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.38));
}

.dw-featured-theatre__close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: rgba(10, 16, 34, 0.88);
  color: #ffffff;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
  transform-origin: center;
}

.dw-featured-theatre__close:hover,
.dw-featured-theatre__close:focus-visible {
  background: var(--color-accent-violet);
  transform: scale(1.06);
}

.dw-featured-theatre__close:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.dw-featured-theatre__close svg {
  width: 1.45rem;
  height: 1.45rem;
}

@media (prefers-reduced-motion: reduce) {
  .dw-featured-theatre,
  .dw-featured-theatre__close {
    transition: none;
  }
}

.dw-post-hero__placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  min-height: inherit;
  padding: 2rem;
  color: var(--color-accent-violet);
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.72) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.72) 1px, transparent 1px),
    var(--gradient-surface);
  background-size: 32px 32px, 32px 32px, auto;
}

.dw-post-hero__placeholder-icon {
  width: 3.2rem;
  height: 3.2rem;
}

.dw-post-hero__placeholder span {
  color: var(--color-primary);
  font-weight: 800;
}

.dw-post-shell {
  padding: clamp(3.5rem, 6vw, 5.25rem) 0 clamp(4.5rem, 8vw, 7rem);
  background: #ffffff;
}

.dw-post-shell__grid {
  display: grid;
  grid-template-columns: minmax(0, 49rem) minmax(16rem, 20rem);
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: start;
}

.dw-post-reading {
  min-width: 0;
}

.dw-post-content {
  max-width: 49rem;
}

.dw-post-content > *:first-child {
  margin-top: 0;
}

.dw-post-content > *:last-child {
  margin-bottom: 0;
}

.dw-post-content p,
.dw-post-content li {
  color: #34415d;
  font-size: clamp(1.02rem, 1.08vw, 1.09rem);
  line-height: 1.86;
}

.dw-post-content p {
  margin: 0 0 1.45rem;
}

.dw-post-content h2,
.dw-post-content h3,
.dw-post-content h4 {
  max-width: 42rem;
}

.dw-post-content h2 {
  display: grid;
  justify-items: center;
  gap: 0.78rem;
  max-width: 100%;
  margin: 3.45rem auto 1.25rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: 0;
  text-align: center;
}

.dw-post-content h2::before,
.dw-post-content h2::after {
  content: "";
  display: block;
  width: min(9.25rem, 42vw);
  height: 0.28rem;
  border-radius: 999px;
  background: var(--gradient-brand);
}

.dw-post-content h2[id],
.dw-post-content h3[id],
.dw-post-content h4[id] {
  scroll-margin-top: var(--dw-post-anchor-offset);
}

.dw-post-content h3 {
  margin: 2.45rem 0 0.85rem;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.dw-post-content h4 {
  margin: 2rem 0 0.7rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0;
}

.dw-post-content ul,
.dw-post-content ol {
  margin: 0 0 1.7rem;
  padding-left: 1.4rem;
}

.dw-post-content li + li {
  margin-top: 0.55rem;
}

.dw-post-content a {
  color: #286df8;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.dw-post-content blockquote {
  margin: 2.4rem 0;
  padding: 1.35rem 0 1.35rem 1.45rem;
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, var(--color-accent-cyan), var(--color-accent-violet)) 1;
  color: #34415d;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.74;
}

.dw-post-content blockquote p {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.dw-dsu-code-box {
  overflow: hidden;
  margin: 2.25rem 0;
  border: 1px solid rgba(137, 119, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(65, 209, 255, 0.12), transparent 16rem),
    linear-gradient(145deg, #08142d 0%, #101d3f 58%, #171f4d 100%);
  box-shadow: 0 24px 54px rgba(16, 26, 55, 0.16);
}

.dw-dsu-code-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.78rem 1rem 0.72rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(232, 239, 255, 0.86);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.2;
}

.dw-dsu-code-box__language {
  flex: 0 0 auto;
  padding: 0.28rem 0.48rem;
  border: 1px solid rgba(65, 209, 255, 0.22);
  border-radius: 8px;
  background: rgba(65, 209, 255, 0.09);
  color: #9ceaff;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.dw-dsu-code-box__pre {
  overflow-x: auto;
  margin: 0;
  padding: 1rem 0;
  background: transparent;
}

.dw-dsu-code-box__code {
  display: block;
  min-width: max-content;
  color: #edf4ff;
  font-family: Consolas, "SFMono-Regular", "Liberation Mono", Menlo, monospace;
  font-size: clamp(0.84rem, 1vw, 0.94rem);
  line-height: 1.72;
  tab-size: 2;
}

.dw-dsu-code-box__line {
  display: grid;
  grid-template-columns: 3.35rem minmax(0, max-content);
  min-width: max-content;
}

.dw-dsu-code-box__number {
  padding: 0 0.78rem 0 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(177, 190, 222, 0.58);
  font-variant-numeric: tabular-nums;
  text-align: right;
  user-select: none;
}

.dw-dsu-code-box__source {
  padding: 0 1.15rem;
  white-space: pre;
}

.dw-dsu-code-box__token--tag {
  color: #7ddfff;
}

.dw-dsu-code-box__token--attr {
  color: #c5b8ff;
}

.dw-dsu-code-box__token--value {
  color: #ffe3a3;
}

.dw-dsu-code-box__token--comment {
  color: rgba(194, 206, 232, 0.56);
}

.dw-post-content img,
.dw-post-content .wp-block-image img {
  border-radius: 8px;
  box-shadow: 0 20px 46px rgba(16, 26, 55, 0.1);
}

.dw-post-content figure {
  margin: 2.25rem 0;
}

.dw-post-content figcaption {
  margin-top: 0.75rem;
  color: rgba(83, 98, 127, 0.82);
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: center;
}

.dw-post-content .dw-dsu-code-box__header {
  margin: 0;
  color: rgba(232, 239, 255, 0.86);
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: left;
}

.dw-post-aside {
  align-self: start;
  position: sticky;
  top: calc(92px + 1.5rem);
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}

.dw-post-support {
  position: relative;
  z-index: 0;
  overflow: hidden;
  padding: 1.35rem;
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(65, 209, 255, 0.22), transparent 13rem),
    linear-gradient(145deg, #0b1430 0%, #111d42 62%, #182455 100%);
  box-shadow: 0 26px 58px rgba(8, 16, 36, 0.18);
}

.dw-post-support::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 0;
  background: linear-gradient(180deg, var(--color-accent-cyan), var(--color-accent-violet));
}

.dw-post-support__heading {
  display: flex;
  align-items: center;
  gap: 0.82rem;
  margin: 0 0 1rem;
}

.dw-post-support__mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dw-post-support__mark svg {
  width: 1.25rem;
  height: 1.25rem;
}

.dw-post-support h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.16rem, 1.45vw, 1.35rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.dw-post-support p {
  margin: 0 0 1.3rem;
  color: rgba(255, 255, 255, 0.73);
  font-size: 0.94rem;
  line-height: 1.68;
}

.dw-post-support__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 850;
}

.dw-post-support__link svg {
  width: 1rem;
  height: 1rem;
}

.dw-post-support__link:hover,
.dw-post-support__link:focus-visible {
  color: var(--color-accent-cyan);
}

.dw-post-toc-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 1.12rem;
  border: 1px solid rgba(137, 119, 255, 0.2);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(16, 26, 55, 0.1);
}

.dw-post-toc-card .dw-dsu-toc {
  position: relative;
  margin: 0;
  padding: 0;
}

.dw-post-toc-card .dw-dsu-toc__title {
  margin: 0 0 0.88rem !important;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 0.96rem !important;
  font-weight: 820;
  line-height: 1.25;
}

.dw-post-toc-card .dw-dsu-toc__list {
  display: grid;
  gap: 0.36rem;
  max-height: 13.32rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  margin: 0;
  padding: 0 0.72rem 0 0;
  list-style: none;
}

.dw-post-toc-card .dw-dsu-toc__list::-webkit-scrollbar,
.dw-post-mobile-toc-card__content .dw-dsu-toc__list::-webkit-scrollbar {
  display: none;
}

.dw-post-toc-card .dw-dsu-toc__item {
  margin: 0;
  padding-left: calc(var(--dw-dsu-toc-indent, 0) * 0.85rem);
}

.dw-post-toc-card .dw-dsu-toc__link {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.62rem 0.7rem;
  border-radius: 8px;
  color: var(--color-primary) !important;
  font-size: 0.9rem;
  line-height: 1.25;
  text-decoration: none;
  transition:
    background-color 260ms ease,
    color 260ms ease;
}

.dw-post-toc-card .dw-dsu-toc__link:focus-visible,
.dw-post-toc-card .dw-dsu-toc__link.is-touch-feedback {
  background: rgba(110, 70, 255, 0.1);
  color: var(--color-accent-violet) !important;
  text-decoration: none;
}

.dw-post-toc-card .dw-dsu-toc__link.is-touch-feedback {
  transition-duration: 80ms;
}

@media (hover: hover) and (pointer: fine) {
  body:not(.dw-post-touch-input) .dw-post-toc-card .dw-dsu-toc__link:hover {
    background: rgba(110, 70, 255, 0.1);
    color: var(--color-accent-violet) !important;
    text-decoration: none;
  }
}

.dw-post-toc-card .dw-dsu-toc__link:focus:not(:focus-visible) {
  text-decoration: none;
}

.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link:link,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link:visited,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link:hover,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link:focus,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link:focus-visible,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link:active,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link.is-touch-feedback,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link *,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link:hover *,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link:focus *,
.dw-post-page [data-dw-post-toc] .dw-dsu-toc__link:active * {
  text-decoration: none !important;
  text-decoration-line: none !important;
}

.dw-post-toc-card .dw-dsu-toc__number {
  color: var(--color-accent-violet);
  font-weight: 800;
  white-space: nowrap;
}

.dw-post-toc-caret {
  display: inline-flex;
  flex: 0 0 0.62rem;
  align-self: flex-start;
  justify-content: center;
  width: 0.62rem;
  margin: 0.25rem 0 0 -0.12rem;
  color: var(--color-accent-violet);
  opacity: 0;
  transform: translateX(-0.12rem);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.dw-post-toc-caret svg {
  width: 0.62rem;
  height: 0.62rem;
}

.dw-dsu-toc__link.is-current .dw-post-toc-caret {
  opacity: 1;
  transform: translateX(0);
}

.dw-post-page-links,
.dw-post-nav {
  margin-top: 2.8rem;
}

.dw-post-social-share {
  margin-top: 2.8rem;
}

.dw-post-social-share + .dw-post-nav {
  margin-top: 1.25rem;
}

.dw-post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.45rem;
  border-top: 1px solid rgba(17, 26, 51, 0.1);
}

.dw-post-nav__link {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid rgba(17, 26, 51, 0.09);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--color-primary);
}

.dw-post-nav__link--next {
  text-align: right;
}

.dw-post-nav__link span {
  color: rgba(83, 98, 127, 0.76);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dw-post-nav__link strong {
  color: var(--color-primary);
  font-size: 0.95rem;
  line-height: 1.35;
}

.dw-post-nav__link:hover,
.dw-post-nav__link:focus-visible {
  border-color: rgba(47, 116, 255, 0.26);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(16, 26, 55, 0.08);
}

.dw-post-all-link {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.dw-post-all-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(137, 119, 255, 0.24);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-accent-violet);
  font-size: 0.9rem;
  font-weight: 820;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(16, 26, 55, 0.08);
}

.dw-post-all-link svg {
  width: 1rem;
  height: 1rem;
}

.dw-post-all-link a:hover,
.dw-post-all-link a:focus-visible {
  border-color: rgba(47, 116, 255, 0.34);
  color: var(--color-accent);
  transform: translateY(-1px);
}

.dw-post-mobile-toc-tools {
  display: none;
}

.dw-post-mobile-toc-card {
  overflow: hidden;
  border: 1px solid rgba(137, 119, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(16, 26, 55, 0.18);
  backdrop-filter: blur(14px);
}

.dw-post-mobile-toc-card__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.56rem 0.65rem 0.56rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

.dw-post-mobile-toc-card__bar svg {
  flex: 0 0 1.12rem;
  width: 1.12rem;
  height: 1.12rem;
  color: var(--color-accent-violet);
}

.dw-post-mobile-toc-card__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 240ms ease;
}

.dw-post-mobile-toc-card__panel[hidden] {
  display: none;
}

.dw-post-mobile-toc-card__inner {
  padding: 0.88rem;
}

.dw-post-mobile-toc-card__header {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 1.75rem;
  padding: 0 2.3rem;
}

.dw-post-mobile-toc-card__header h2 {
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 820;
  line-height: 1.25;
  text-align: center;
}

.dw-post-mobile-toc-card__icon-button {
  position: absolute;
  top: -0.25rem;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-accent-violet);
  cursor: pointer;
}

.dw-post-mobile-toc-card__icon-button svg {
  width: 1.12rem;
  height: 1.12rem;
}

.dw-post-mobile-toc-card__icon-button:hover,
.dw-post-mobile-toc-card__icon-button:focus-visible {
  background: rgba(110, 70, 255, 0.1);
}

.dw-post-mobile-toc-card__content {
  margin-top: 0.75rem;
}

.dw-post-mobile-toc-card__content .dw-dsu-toc {
  position: relative;
  margin: 0;
  padding: 0;
}

.dw-post-mobile-toc-card__content .dw-dsu-toc__title {
  display: none;
}

.dw-post-mobile-toc-card__content .dw-dsu-toc__list {
  display: grid;
  gap: 0.32rem;
  max-height: 12.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  margin: 0;
  padding: 0 0.72rem 0 0;
  list-style: none;
}

.dw-post-toc-scrollbar {
  position: absolute;
  top: var(--dw-post-toc-scrollbar-top, 0);
  right: 0.04rem;
  width: 0.44rem;
  height: var(--dw-post-toc-scrollbar-height, 0);
  border-radius: 999px;
  background: rgba(232, 240, 255, 0.94);
  opacity: 1;
  cursor: ns-resize;
  pointer-events: auto;
  touch-action: none;
  z-index: 2;
}

.dw-post-toc-scrollbar::before {
  content: "";
  position: absolute;
  inset: -0.28rem -0.42rem;
  border-radius: inherit;
  background: transparent;
}

.dw-post-toc-scrollbar[hidden] {
  display: none;
}

.dw-post-toc-scrollbar__thumb {
  position: absolute;
  top: var(--dw-post-toc-scrollbar-thumb-top, 0);
  left: 0;
  width: 100%;
  height: var(--dw-post-toc-scrollbar-thumb-height, 2rem);
  border-radius: inherit;
  background: var(--color-accent-violet);
  box-shadow: 0 2px 8px rgba(110, 70, 255, 0.2);
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
}

.dw-post-mobile-toc-card__content .dw-dsu-toc__item {
  margin: 0;
  padding-left: calc(var(--dw-dsu-toc-indent, 0) * 0.8rem);
}

.dw-post-mobile-toc-card__content .dw-dsu-toc__link {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.58rem 0.64rem;
  border-radius: 8px;
  color: var(--color-primary);
  font-size: 0.86rem;
  line-height: 1.22;
  text-decoration: none;
  transition:
    background-color 260ms ease,
    color 260ms ease;
}

.dw-post-mobile-toc-card__content .dw-dsu-toc__link:focus-visible,
.dw-post-mobile-toc-card__content .dw-dsu-toc__link.is-touch-feedback {
  background: rgba(110, 70, 255, 0.1);
  color: var(--color-accent-violet);
}

.dw-post-mobile-toc-card__content .dw-dsu-toc__link.is-touch-feedback {
  transition-duration: 80ms;
}

@media (hover: hover) and (pointer: fine) {
  body:not(.dw-post-touch-input) .dw-post-mobile-toc-card__content .dw-dsu-toc__link:hover {
    background: rgba(110, 70, 255, 0.1);
    color: var(--color-accent-violet);
  }
}

.dw-post-mobile-toc-card__content .dw-dsu-toc__link:focus:not(:focus-visible) {
  text-decoration: none;
}

.dw-post-mobile-toc-card__content .dw-dsu-toc__number {
  color: var(--color-accent-violet);
  font-weight: 800;
  white-space: nowrap;
}

.dw-post-mobile-toc-tools.is-toc-open .dw-post-mobile-toc-card__bar,
.dw-post-mobile-toc-tools.is-toc-closing .dw-post-mobile-toc-card__bar {
  display: none;
}

@media (max-width: 1020px) {
  .dw-post-hero__grid,
  .dw-post-shell__grid {
    grid-template-columns: 1fr;
  }

  .dw-post-hero__content,
  .dw-post-hero h1,
  .dw-post-hero__excerpt,
  .dw-post-content {
    max-width: none;
  }

  .dw-post-hero__media {
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
  }

  .dw-post-hero__media-frame {
    aspect-ratio: 1 / 1;
    min-height: 0;
  }

  .dw-post-hero__media-frame picture {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dw-post-hero__media-frame img {
    object-fit: contain;
  }

  .dw-post-aside {
    order: -1;
    position: static;
    width: 100%;
    max-width: 38rem;
    margin: 0 auto;
  }

  .dw-post-toc-card--desktop {
    display: none;
  }

  .dw-post-mobile-toc-tools {
    position: fixed;
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    z-index: 890;
    display: grid;
    width: min(11.25rem, calc(100vw - 1.5rem));
    pointer-events: none;
    transition: width 240ms ease;
  }

  .dw-post-mobile-toc-tools.is-docked {
    position: absolute;
    top: var(--dw-post-mobile-toc-dock-top, auto);
    bottom: auto;
  }

  .dw-post-mobile-toc-tools.is-toc-open {
    width: min(20rem, calc(100vw - 1.5rem));
  }

  .dw-post-mobile-toc-tools > * {
    pointer-events: auto;
  }
}

@media (max-width: 720px) {
  .dw-post-hero {
    padding: calc(82px + 2.6rem) 0 3rem;
  }

  .dw-post-meta__item {
    min-height: 2.15rem;
    font-size: 0.74rem;
  }

  .dw-post-hero h1 {
    font-size: clamp(2.3rem, 10.5vw, 3.05rem);
  }

  .dw-post-hero__media {
    max-width: 25rem;
  }

  .dw-post-shell {
    padding: 3rem 0 4.25rem;
  }

  .dw-post-nav {
    grid-template-columns: 1fr;
  }

  .dw-post-nav__link--next {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .dw-post-meta {
    gap: 0.5rem;
  }

  .dw-post-meta__item {
    width: 100%;
    justify-content: center;
  }

  .dw-post-back {
    margin-bottom: 1.15rem;
  }
}
