/* ===== Article / post reading page ===== */

.post-page {
  overflow-x: clip;
}

.post-page .page-standard-body {
  max-width: 100%;
}

.post-page .post-article {
  padding-bottom: calc(5.5rem + var(--safe-bottom));
}

html.has-mobile-tabs .post-page .post-article {
  padding-bottom: calc(var(--mobile-tab-h) + 5.5rem + var(--safe-bottom));
}

@media (min-width: 1025px) {
  .post-page .post-article {
    padding-bottom: 4rem;
  }
}

.post-page .breadcrumb {
  margin: 0.75rem 0 1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-page .breadcrumb span {
  color: var(--color-text);
  font-weight: 500;
}

/* Layout */
.post-page .article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.5rem;
  padding: 0 0 4rem;
  align-items: start;
}

.post-article {
  min-width: 0;
}

/* Hero */
.post-hero {
  margin-bottom: 1.5rem;
}

.post-hero .article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  background: var(--color-border);
  display: block;
}

.post-hero-body {
  max-width: 720px;
}

.post-read-lang {
  margin: 0.5rem 0 0.75rem;
}

.post-read-lang-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.post-read-lang-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.post-read-lang-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.post-read-lang-btn {
  border: 1px solid var(--color-border);
  background: var(--surface-1, var(--color-bg));
  color: var(--color-text);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.post-read-lang-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.post-read-lang-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.post-hero .post-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.post-hero .post-card-tag a {
  color: var(--color-primary);
  text-decoration: none;
}

.post-hero h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.post-excerpt {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding-top: 0.25rem;
}

.post-meta-row .article-author {
  margin-bottom: 0;
}

.article-author-info {
  min-width: 0;
  flex: 1;
}

.article-author-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.article-author-handle {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.article-author-handle a {
  color: inherit;
  text-decoration: none;
}

.article-author-handle a:hover {
  color: var(--color-primary);
}

.article-author-avatar-link {
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
  line-height: 0;
}

.article-author-avatar-link img,
.article-author-avatar-link .author-avatar-ph {
  display: block;
}

.article-author-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
}

.article-author-name-row #author-link {
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.article-author-name-row #author-link:hover {
  color: var(--color-primary);
}

.post-meta-row .article-author-name-row .btn.is-active,
#author-card-follow-btn.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

.post-meta-row .article-author-name-row .btn.is-active .icon,
#author-card-follow-btn.is-active .icon {
  color: var(--color-primary);
}

.post-meta-row .article-meta {
  font-size: 0.88rem;
  margin-top: 0.15rem;
}

/* Actions */
.post-actions-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.post-actions-bar .btn.is-active,
.post-actions-more .btn.is-active,
.post-float-btn.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

.post-actions-bar .btn.is-active .icon,
.post-float-btn.is-active .icon {
  color: var(--color-primary);
}

.post-actions-primary {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.post-actions-primary::-webkit-scrollbar {
  display: none;
}

.post-actions-bar .btn,
.post-actions-bar summary.btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.post-actions-more {
  position: relative;
  flex-shrink: 0;
}

.post-actions-more summary {
  list-style: none;
  cursor: pointer;
}

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

.post-actions-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  min-width: 10rem;
  padding: 0.35rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.post-actions-more-menu .btn {
  justify-content: flex-start;
  width: 100%;
}

/* Share menu */
.post-share-wrap {
  position: relative;
  flex-shrink: 0;
}

.post-share-wrap summary {
  list-style: none;
  cursor: pointer;
}

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

.post-share-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  z-index: 25;
  min-width: 11.5rem;
  max-width: min(18rem, calc(100vw - 2rem));
  padding: 0.35rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.post-share-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--color-text);
  font-size: 0.88rem;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.post-share-item:hover,
.post-share-item:focus-visible {
  background: var(--color-primary-light);
  outline: none;
}

.post-share-brand {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.25rem;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.post-share-brand--whatsapp {
  color: #25d366;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.435 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.435 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
}

.post-share-brand--facebook {
  color: #1877f2;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/%3E%3C/svg%3E");
}

.post-share-brand--line {
  color: #06c755;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.346 0 .627.285.627.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.039 1.085l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.346 0 .627.285.627.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.039 1.085l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314'/%3E%3C/svg%3E");
}

.post-share-brand--telegram {
  color: #26a5e4;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z'/%3E%3C/svg%3E");
}

.post-share-brand--twitter {
  color: var(--color-text);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.post-tags .filter-pill {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.post-tags .filter-pill:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

/* Article body + TOC */
.post-article-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 720px;
}

.post-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

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

.post-body p {
  margin: 0 0 1.15rem;
}

.post-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 2.25rem 0 0.85rem;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.post-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 1.75rem 0 0.65rem;
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.post-body h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.post-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body a:hover {
  color: var(--color-primary-hover);
}

.post-body strong {
  font-weight: 600;
}

.post-body ul,
.post-body ol {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
}

.post-body li {
  margin-bottom: 0.4rem;
}

.post-body li > ul,
.post-body li > ol {
  margin-top: 0.4rem;
  margin-bottom: 0;
}

.post-body blockquote {
  margin: 1.5rem 0;
  padding: 0.85rem 1.15rem;
  border-left: 4px solid var(--color-primary);
  background: var(--color-primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text);
}

.post-body blockquote p:last-child {
  margin-bottom: 0;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

.post-body img,
.post-body video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.25rem auto;
  display: block;
}

.post-body figure {
  margin: 1.5rem 0;
}

.post-body figure img {
  margin: 0 auto;
}

.post-body figcaption {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  text-align: center;
}

.post-body iframe {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: var(--radius);
  margin: 1.25rem 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.post-body th,
.post-body td {
  border: 1px solid var(--color-border);
  padding: 0.55rem 0.75rem;
  text-align: left;
  min-width: 5rem;
}

.post-body th {
  background: var(--color-primary-light);
  font-weight: 600;
}

.post-body pre,
.post-body code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.post-body pre {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 1.55;
}

.post-body :not(pre) > code {
  padding: 0.15rem 0.4rem;
  background: var(--color-primary-light);
  border-radius: 4px;
  color: var(--color-primary-hover);
}

[data-theme='dark'] .post-body pre {
  background: #0f172a;
}

[data-theme='dark'] .post-body :not(pre) > code {
  background: rgb(91 127 255 / 18%);
}

/* TOC */
.post-toc {
  padding: 1rem 1.15rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.post-toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.post-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.post-toc-link {
  display: block;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
}

.post-toc-link:hover {
  color: var(--color-primary);
}

.post-toc-link--h3 {
  padding-left: 0.85rem;
  font-size: 0.85rem;
}

/* Sidebar */
.post-page .article-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--safe-top) + 1rem);
}

.post-page .sidebar-section h3 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.post-deal-card .post-deal-price {
  font-size: 1.05rem;
  margin: 0.35rem 0;
}

.post-deal-card s {
  color: var(--color-text-muted);
  margin-left: 0.35rem;
}

.post-deal-link {
  margin-top: 0.5rem;
}

/* Author card */
.post-author-card {
  max-width: 720px;
  margin: 2.5rem 0 0;
  padding: 1.25rem 1.35rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.post-author-card-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.post-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-author-avatar-ph {
  display: grid;
  place-items: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.post-author-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

.post-author-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.post-author-name:hover {
  color: var(--color-primary);
}

.post-author-handle {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.post-author-handle a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.post-author-handle a:hover {
  color: var(--color-primary);
}

.post-author-bio {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.post-author-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.post-author-more {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.post-author-more:hover {
  text-decoration: underline;
}

/* Related posts inline */
.post-related {
  max-width: 720px;
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.post-related h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 1.15rem;
}

.post-related .post-grid {
  gap: 0.85rem;
}

/* Skeleton loading */
.post-skeleton {
  max-width: 720px;
  margin: 1rem auto 3rem;
  padding: 0 0 2rem;
}

.post-skeleton-cover {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  background: linear-gradient(90deg, var(--color-border) 25%, rgb(91 127 255 / 8%) 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: post-shimmer 1.4s infinite;
}

.post-skeleton-line {
  height: 14px;
  margin-bottom: 0.65rem;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--color-border) 25%, rgb(91 127 255 / 8%) 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: post-shimmer 1.4s infinite;
}

.post-skeleton-line.wide {
  height: 28px;
  width: 85%;
  margin-bottom: 0.85rem;
}

.post-skeleton-line.short {
  width: 45%;
}

.post-skeleton-block {
  margin-top: 1.5rem;
}

@keyframes post-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Comments */
.post-page .comments-section {
  max-width: 720px;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.post-page .comments-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

.post-comments-empty {
  padding: 1.5rem;
  text-align: center;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px dashed var(--color-border);
}

.post-page #comment-form-wrap {
  margin-bottom: 1.5rem;
}

.comment-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.post-comment-login {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1.15rem 1.25rem;
  background: var(--color-primary-light);
  border-radius: var(--radius);
  border: 1px solid rgb(91 127 255 / 20%);
}

.post-comment-login p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text);
}

.post-page #comment-input {
  min-height: 5.5rem;
  font-size: 1rem;
  line-height: 1.55;
  resize: vertical;
}

.post-page .comment-item {
  padding: 1rem 0;
}

.post-page .comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.post-page .comment-text {
  margin: 0.4rem 0 0;
}

.post-page .comment-reply {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--color-primary-light);
}

/* Mobile floating bar */
.post-float-bar {
  position: fixed;
  z-index: 90;
  left: max(var(--gutter), env(safe-area-inset-left));
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: calc(0.65rem + var(--safe-bottom));
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: 0 8px 32px rgb(27 38 79 / 14%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), visibility 0.25s;
  pointer-events: none;
}

.post-float-bar.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

html.has-mobile-tabs .post-float-bar {
  bottom: calc(var(--mobile-tab-h) + 0.65rem + var(--safe-bottom));
}

.post-float-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.85rem;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.post-float-btn:hover,
.post-float-btn.is-active {
  background: rgb(91 127 255 / 12%);
  color: var(--color-primary);
}

/* Article location (below body) */
.post-location {
  margin: 2rem 0 0;
  max-width: 720px;
}

.post-location-inner {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.post-location-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.post-location-name {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.post-location-address {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.post-location-map-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.post-location-map-card:hover {
  box-shadow: 0 8px 24px rgb(27 38 79 / 12%);
}

.post-location-map-mount {
  position: relative;
  width: 100%;
  min-height: 220px;
  background: var(--color-bg-muted);
}

.post-location-map-shell {
  position: relative;
}

.post-location-map-canvas {
  width: 100%;
  height: 220px;
  z-index: 0;
}

.post-location-map-canvas.leaflet-container {
  font-family: inherit;
}

.post-location-map-attribution {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  z-index: 500;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgb(255 255 255 / 82%);
  font-size: 0.62rem;
  line-height: 1.2;
  color: var(--color-text-muted);
  pointer-events: none;
}

.post-location-map-pin {
  background: transparent;
  border: none;
}

.post-location-map-pin span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  background: var(--color-primary, #5b7fff);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgb(27 38 79 / 28%);
  transform: rotate(-45deg);
}

.post-location-map-pin span::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: rotate(45deg);
}

.post-location-map-fallback {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.post-location-map-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  background: var(--color-bg-muted);
}

.post-location-map-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.92), var(--color-surface));
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  border-top: 1px solid var(--color-border);
}

.post-location-map-cta:hover {
  color: var(--color-primary);
  text-decoration: none;
}

html[data-theme='dark'] .post-location-map-attribution {
  background: rgb(15 20 40 / 78%);
  color: #c5cee8;
}

html[data-theme='dark'] .post-location-map-cta {
  background: linear-gradient(180deg, rgb(30 35 48 / 0.95), var(--color-surface));
}

/* Desktop: TOC beside content */
@media (min-width: 1025px) {
  .post-article-main.has-toc {
    grid-template-columns: 200px minmax(0, 1fr);
    max-width: 920px;
    gap: 2.5rem;
  }

  .post-toc {
    position: sticky;
    top: calc(var(--nav-height) + var(--safe-top) + 1rem);
    align-self: start;
    max-height: calc(100dvh - var(--nav-height) - 2rem);
    overflow-y: auto;
  }

  .post-float-bar {
    display: none;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .post-page .article-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-bottom: 3rem;
  }

  .post-page .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
  }

  .post-article-main {
    max-width: 100%;
  }

  .post-toc {
    order: -1;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .post-page .breadcrumb {
    margin-top: 0.35rem;
  }

  .post-hero .article-cover {
    border-radius: var(--radius);
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    width: calc(100% + 2 * var(--gutter));
    max-width: none;
    border-radius: 0;
  }

  .post-hero h1 {
    font-size: clamp(1.45rem, 6vw, 1.75rem);
  }

  .post-excerpt {
    font-size: 1rem;
  }

  .post-body {
    font-size: 1.0625rem;
    line-height: 1.78;
  }

  .post-actions-primary .btn,
  #share-btn {
    min-height: 44px;
    padding-inline: 0.65rem;
    font-size: 0.82rem;
  }

  .post-share-menu {
    left: 0;
    right: auto;
    max-height: min(18rem, 50vh);
    overflow-y: auto;
  }

  .post-page .article-sidebar {
    grid-template-columns: 1fr;
  }

  .post-page .comments-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .post-related {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .post-related h2 {
    font-size: 1.1rem;
    margin-bottom: 0.85rem;
  }

  .post-related .post-grid {
    gap: 0.65rem;
  }

  .post-author-card {
    margin-top: 2rem;
    padding: 1rem 1.1rem;
  }

  .post-skeleton-cover {
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    width: calc(100% + 2 * var(--gutter));
    border-radius: 0;
  }

  .post-page .comment-actions .btn {
    min-height: 40px;
  }
}

.post-translation-notice {
  margin: 0.75rem 0 1rem;
}

.post-translation-notice-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  background: var(--surface-2, rgba(0, 0, 0, 0.03));
}

.post-translation-actions {
  margin-left: auto;
}

.post-translation-credit {
  display: inline-block;
  font-size: 0.8rem;
  opacity: 0.85;
}

.post-translation-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary, #0d9488);
}

.post-translation-note {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.85rem;
}

.comment-original-toggle {
  padding-left: 0;
  font-size: 0.8rem;
}

