.h3-lang-box { display: none; }

.post { display: block; }

.post-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  grid-template-rows: 1fr repeat(6, auto) 1fr;
  column-gap: 48px;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--h3-line);
}

.post-hero > * { grid-column: 1; }

.post-crumbs     { grid-row: 2; }
.post-title      { grid-row: 3; }
.post-intro      { grid-row: 4; }
.post-intro-rest { grid-row: 5; }
.post-cta        { grid-row: 6; }
.post-meta       { grid-row: 7; }

.post-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: .82rem;
  color: var(--h3-text-dim2);
}

.post-crumbs a { color: var(--h3-text-dim); }
.post-crumbs a:hover { color: var(--h3-primary-text); }

.post-title {
  margin: 0 0 18px;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.025em;
  color: var(--h3-text);
}

.post-intro,
.post-intro-rest { margin: 0 0 12px; max-width: 54ch; }

.post-intro-rest { margin-bottom: 24px; }

.post-intro p,
.post-intro-rest p {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--h3-text-dim);
}

.post-intro p:last-child,
.post-intro-rest p:last-child { margin-bottom: 0; }

.post-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: .8rem;
  color: var(--h3-text-dim2);
}

.post-meta a { color: var(--h3-text-dim); }
.post-meta a:hover { color: var(--h3-primary-text); }

.post-hero-media {
  position: relative;
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  width: 500px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--h3-r-card);
  background: var(--h3-panel);
  overflow: hidden;
}

.post-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.post-chat {
  display: flex;
  flex-direction: column;
}

.post-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--h3-line);
}

.post-chat-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--h3-primary);
  font-size: 1rem;
  font-weight: 700;
  color: var(--h3-on-accent);
}

.post-chat-head b { display: block; font-size: .95rem; color: var(--h3-text); }
.post-chat-head span { font-size: .82rem; color: var(--h3-primary-text); }

.post-chat-feed {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px 20px;
}

.post-bubble {
  max-width: 80%;
  margin: 0;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: .95rem;
  line-height: 1.45;
}

.post-bubble-in {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: var(--h3-panel-2);
  color: var(--h3-text);
}

.post-bubble-out {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--h3-primary);
  color: var(--h3-on-accent);
}

.post-shell {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 40px;
}

.post-toc {
  margin: 0 0 36px;
  background: var(--h3-panel);
  border: 1px solid var(--h3-line);
  border-radius: var(--h3-r-card);
  overflow: hidden;
}

.post-toc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--h3-text);
  cursor: pointer;
  list-style: none;
}

.post-toc-head::-webkit-details-marker { display: none; }
.post-toc-head:hover { background: var(--h3-primary-weak); }

.post-toc-caret {
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid var(--h3-text-dim2);
  border-bottom: 2px solid var(--h3-text-dim2);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}

.post-toc[open] .post-toc-caret {
  border-color: var(--h3-primary-text);
  transform: rotate(-135deg) translate(-3px, -3px);
}

.post-toc[open] .post-toc-head { border-bottom: 1px solid var(--h3-line); }

.post-toc-list {
  list-style: none;
  margin: 12px 20px 14px;
  padding: 0;
  border-left: 1px solid var(--h3-line);
}

.post-toc-list a {
  display: block;
  padding: 8px 0 8px 15px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--h3-text-dim);
}

.post-toc-list a:hover {
  color: var(--h3-text);
  border-left-color: var(--h3-primary);
}

.post-toc-list .is-sub a {
  padding-left: 28px;
  font-size: .86rem;
  color: var(--h3-text-dim2);
}

.post-body {
  font-size: 1.04rem;
  line-height: 1.76;
  color: var(--h3-text-dim);
  overflow-wrap: break-word;
}

.post-body > * { margin: 0; }
.post-body > * + * { margin-top: 20px; }

.post-body h2 {
  margin: 52px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--h3-line);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.02em;
  color: var(--h3-text);
  scroll-margin-top: calc(var(--h3-header-h) + 16px);
}

.post-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.post-body h3 {
  margin: 34px 0 0;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -.015em;
  color: var(--h3-text);
  scroll-margin-top: calc(var(--h3-header-h) + 16px);
}

.post-body .post-fig {
  width: 500px;
  max-width: 100%;
  margin: 36px auto;
}

.post-sq {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--h3-r-card);
  background: var(--h3-panel);
  overflow: hidden;
}

.post-sq img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-body strong { color: var(--h3-text); font-weight: 600; }

.post-body a:not(.h3-btn) {
  color: var(--h3-primary-text);
  border-bottom: 1px solid var(--h3-primary-soft);
}

.post-body a:not(.h3-btn):hover { border-bottom-color: var(--h3-primary); }

.post-body ul,
.post-body ol { margin: 0; padding-left: 24px; }

.post-body li { margin: 9px 0; }
.post-body li::marker { color: var(--h3-primary-text); }

.post-table-wrap {
  margin: 32px 0;
  border: 1px solid var(--h3-line);
  border-radius: var(--h3-r-card);
  background: var(--h3-panel);
  overflow-x: auto;
}

.post-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: .92rem;
}

.post-table caption {
  caption-side: top;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--h3-line);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: left;
  color: var(--h3-text-dim2);
}

.post-table th,
.post-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--h3-line);
  text-align: left;
  vertical-align: top;
}

.post-table thead th {
  background: var(--h3-panel);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--h3-text-dim2);
  white-space: nowrap;
}

.post-table tbody th {
  font-weight: 600;
  color: var(--h3-text);
  white-space: nowrap;
}

.post-table tbody td { color: var(--h3-text-dim); }

.post-table tbody tr:last-child th,
.post-table tbody tr:last-child td { border-bottom: 0; }

.post-yes { color: var(--h3-primary-text); font-weight: 600; }
.post-no { color: var(--h3-text-dim2); }

.post-faq {
  display: grid;
  gap: 10px;
}

.post-body .post-faq { margin-top: 24px; }

.post-faq-item {
  background: var(--h3-panel);
  border: 1px solid var(--h3-line);
  border-radius: var(--h3-r-card);
  overflow: hidden;
}

.post-faq-q {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--h3-text);
  cursor: pointer;
  list-style: none;
}

.post-faq-q::-webkit-details-marker { display: none; }
.post-faq-q:hover { background: var(--h3-primary-weak); }

.post-faq-caret {
  flex: none;
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid var(--h3-text-dim2);
  border-bottom: 2px solid var(--h3-text-dim2);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}

.post-faq-item[open] .post-faq-caret {
  border-color: var(--h3-primary-text);
  transform: rotate(-135deg) translate(-3px, -3px);
}

.post-faq-item[open] .post-faq-q { border-bottom: 1px solid var(--h3-line); }

.post-faq-item p {
  margin: 0;
  padding: 16px 20px 18px;
  font-size: .96rem;
  line-height: 1.7;
  color: var(--h3-text-dim);
}

.post-author {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  column-gap: 20px;
  align-items: center;
  margin: 52px 0 0;
  padding: 22px;
  background: var(--h3-panel);
  border: 1px solid var(--h3-line);
  border-radius: var(--h3-r-card);
}

.post-author-photo {
  position: relative;
  width: 104px;
  aspect-ratio: 1 / 1;
  border-radius: var(--h3-r-card);
  background: var(--h3-panel-2);
  overflow: hidden;
}

.post-author-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author-body { min-width: 0; }

.post-author-role {
  margin: 0 0 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--h3-primary-text);
}

.post-author-name {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--h3-text);
}

.post-author-name a { color: inherit; }
.post-author-name a:hover { color: var(--h3-primary-text); }

.post-author-bio {
  margin: 0 0 14px;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--h3-text-dim);
}

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

.post-author-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--h3-line);
  border-radius: var(--h3-r-pill);
  font-size: .82rem;
  font-weight: 600;
  color: var(--h3-text-dim);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.post-author-link:hover {
  color: var(--h3-primary-text);
  border-color: var(--h3-primary);
  background: var(--h3-primary-weak);
}

.post-author-link svg { width: 15px; height: 15px; flex: none; }

@media (max-width: 1279px) {
  .post-hero { grid-template-columns: minmax(0, 1fr) 400px; column-gap: 36px; }
  .post-hero-media { width: 400px; }
}

@media (max-width: 899px) {
  .post-hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .post-hero > * { grid-row: auto; }
  .post-hero-media {
    grid-column: 1;
    margin: 0 auto 22px;
  }
  .post-chat { aspect-ratio: auto; }
  .post-intro,
  .post-intro-rest { max-width: none; }
  .post-intro { margin-bottom: 20px; }
  .post-intro-rest { margin-bottom: 20px; }
}

@media (max-width: 767px) {
  .post-shell { padding-top: 32px; }
  .post-hero { padding-bottom: 26px; }
  .post-body h2 { margin-top: 42px; padding-top: 26px; }
}

@media (max-width: 639px) {
  .post-author {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 14px;
    padding: 18px;
    text-align: center;
  }
  .post-author-photo { width: 88px; }
  .post-toc { margin-bottom: 28px; }
  .post-body .post-fig { margin: 28px auto; }
}

@media (max-width: 559px) {
    .post-cta { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .post-toc-caret,
  .post-faq-caret,
  .post-author-link { transition: none; }
}
