/* ==========================================================================
   detail.css — 文章页（左侧竖排分享栏 + 居中长文 + 底部推荐）
   ========================================================================== */

/* ---------- 分享图标字体 ---------- */
.fa {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.fa-circle-exclamation:before,
.fa-exclamation-circle:before { content: "\f06a"; margin-right: 2px; }
.fa-facebook:before { content: "\f09a"; }
.fa-twitter:before { content: "\f099"; }
.fa-google-plus:before { content: "\f2b3"; }
.fa-stumbleupon:before { content: "\f1a4"; }
.fa-linkedin:before { content: "\f08c"; }

/* ---------- 版式：左侧竖排分享轨 + 正文 ---------- */
.postwrap {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.sharebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 16px;
}
.sharebar__label {
  margin-bottom: 2px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: center;
}
.sharebar__list { display: flex; flex-direction: column; gap: 8px; }
.sharebar__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule-2);
  background: var(--paper);
  color: var(--ink-2);
  transition: all .2s var(--ease);
}
.sharebar__link:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.sharebar__ico { display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.sharebar__text { display: none; }
.sharebar__link--facebook .sharebar__ico { color: #3b5998; }
.sharebar__link--twitter .sharebar__ico { color: #0f8fd0; }
.sharebar__link--google .sharebar__ico { color: #db4437; }
.sharebar__link--stumbleupon .sharebar__ico { color: #eb4924; }
.sharebar__link--linkedin .sharebar__ico { color: #0a66c2; }

/* ---------- 文章主体 ---------- */
.post__head { padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.post__title {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.7vw, 2.3rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.018em;
  word-wrap: break-word;
}
.post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.post__author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: .83rem; }
.post__avatar { width: 30px; height: 30px; border: 1px solid var(--rule-2); border-radius: 50%; object-fit: cover; }
.post__dot { width: 1px; height: 13px; background: var(--rule-2); }
.post__read { display: inline-flex; align-items: center; gap: 6px; }
.post__read svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; }

.post__hero { margin: 18px 0 2px; overflow: hidden;  }
.post__hero img { max-height: 450px; }

.post__body {
  padding: 16px 0 6px;
  color: #232a33;
  font-size: 1.02rem;
  line-height: 1.66;
  word-wrap: break-word;
}
.post__body p { margin-bottom: 18px; }
.post__body h1,
.post__body h2,
.post__body h3,
.post__body h4 { margin: 28px 0 12px; color: var(--ink); font-family: var(--font-display); line-height: 1.3; }
.post__body ul,
.post__body ol { margin-bottom: 18px; padding-left: 24px; list-style: revert; }
.post__body li { margin-bottom: 5px; }
.post__body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.post__body a:hover { color: var(--brand-dark); }
.post__body blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-left: 3px solid var(--brand);
  background: var(--paper-2);
  color: var(--ink-2);
}
.post__body img,
.post__body iframe,
.post__body video {
  max-width: 100% !important;
  height: auto;
  max-height: 470px;
  margin: 0 auto 14px;
}
.post__body table { width: 100%; margin-bottom: 18px; border-collapse: collapse; }
.post__body th,
.post__body td { padding: 8px 11px; border: 1px solid var(--rule); }
.post__body hr { margin: 26px 0; border: 0; border-top: 1px solid var(--rule); }
.ez-toc-title { color: var(--ink); }

/* ---------- 窄屏：分享栏改为横向一行 ---------- */
@media (max-width: 900px) {
  .postwrap { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .sharebar { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--rule); background: var(--paper-2); }
  .sharebar__label { margin: 0 4px 0 0; }
  .sharebar__list { flex-direction: row; flex-wrap: wrap; }
  .sharebar__link { width: auto; height: auto; gap: 8px; padding: 7px 13px; border-color: var(--rule); }
  .sharebar__text { display: inline; font-size: .78rem; }
  .post__hero img{width: 100%;height: auto;}
}

@media (max-width: 620px) {
  .post__title { font-size: 1.44rem; }
  .post__body { font-size: .96rem; line-height: 1.64; }
  .sharebar__text { display: none; }
}
