/**
 * PoeticTheme 3.0.10统一控制层。
 *
 * 本文件保存前台控制规则。每个属性独立成行，便于维护。
 */

/* 主题托管导航 */
.pt-managed-nav,
.pt-managed-footer-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pt-managed-navigation {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.pt-managed-mobile {
  display: none;
  position: relative;
}

.pt-managed-mobile summary {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--pt-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.pt-managed-mobile summary::-webkit-details-marker {
  display: none;
}

.pt-managed-mobile nav {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 1100;
  display: grid;
  width: min(300px, calc(100vw - 30px));
  padding: 12px;
  border: 1px solid var(--pt-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--pt-shadow);
}

.pt-managed-mobile nav a {
  padding: 10px 13px;
  border-radius: 10px;
  color: var(--pt-ink);
  font-weight: 700;
  text-decoration: none;
}

.pt-managed-mobile nav a:hover,
.pt-managed-mobile nav a.is-current {
  background: #e7f6fd;
  color: var(--pt-deep);
}

.pt-managed-nav {
  justify-content: flex-end;
  margin-left: auto;
}

.pt-managed-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--pt-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.pt-managed-nav a:hover,
.pt-managed-nav a:focus-visible {
  background: #e5f5fc;
  color: var(--pt-deep);
  transform: translateY(-1px);
}

.pt-managed-nav a.is-current {
  background: var(--pt-blue);
  color: #fff;
  box-shadow: 0 7px 18px rgba(0, 146, 220, 0.25);
}

.pt-managed-nav a.is-current::after {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--pt-red);
  content: "";
}

.pt-managed-nav a.is-blue {
  background: var(--pt-blue);
  color: #fff;
}

.pt-managed-nav a.is-red {
  background: var(--pt-red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(218, 37, 31, 0.2);
}

.pt-managed-footer-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 22px;
}

.pt-managed-footer-nav a {
  color: #cbe0e9;
  font-size: 13px;
  text-decoration: none;
}

.pt-managed-footer-nav a:hover {
  color: #fff;
}

/* 统一标题比例 */
.pt-hero-slide-custom h1 {
  font-size: clamp(32px, 3.2vw, 40px);
  line-height: 1.18;
}

.pt-home-heading h2 {
  font-size: clamp(26px, 2.4vw, 31px);
  line-height: 1.25;
}

.pt-archive-hero h1,
.pt-about-hero h1 {
  font-size: clamp(30px, 3vw, 36px);
  line-height: 1.2;
}

.pt-article-hero h1,
.pt-detail-summary h1 {
  font-size: clamp(32px, 3.2vw, 38px);
  line-height: 1.2;
}

.pt-home-about h2 {
  font-size: clamp(27px, 2.8vw, 34px);
  line-height: 1.25;
}

/* 页面与栏目标题图 */
.pt-about-hero.has-pt-header-image,
.pt-archive-hero.has-pt-header-image,
.pt-standard-page-hero.has-pt-header-image {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-image:
    linear-gradient(90deg, rgba(8, 35, 52, 0.9), rgba(8, 35, 52, 0.35)),
    var(--pt-header-image);
  background-position: center;
  background-size: cover;
  color: #fff;
}

.pt-about-hero.has-pt-header-image h1,
.pt-about-hero.has-pt-header-image p,
.pt-archive-hero.has-pt-header-image h1,
.pt-archive-hero.has-pt-header-image p,
.pt-about-hero.has-pt-header-image .pt-eyebrow {
  color: #fff;
}

.pt-standard-page-hero {
  width: 100%;
  margin-bottom: 22px;
  padding: 40px 46px;
  border-radius: 28px;
  box-shadow: var(--pt-shadow);
}

.pt-standard-page-hero > span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.pt-standard-page-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 3vw, 36px);
  line-height: 1.2;
}

.pt-standard-page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.pt-about-hero.has-pt-header-image .wp-block-post-excerpt {
  color: rgba(255, 255, 255, 0.86);
}

/* 三张频道卡片完全一致 */
.pt-channel-layout {
  align-items: start;
}

.pt-channel-layout > .pt-channel-entry {
  height: auto;
  align-self: start;
}

.pt-channel-entry-media {
  height: 150px;
  min-height: 150px;
  max-height: 150px;
}

.pt-channel-entry-number {
  top: 14px;
  right: 14px;
  margin: 0;
}

.pt-channel-entry-body {
  padding: 18px 21px 20px;
}

.pt-channel-entry-body > :first-child {
  margin-top: 0;
}

/* 长文目录 */
.pt-article-card {
  position: relative;
}

.pt-reading-toc {
  position: fixed;
  top: 128px;
  left: max(18px, calc(50vw - 760px));
  z-index: 40;
  width: 240px;
}

.pt-toc-toggle {
  display: none;
}

.pt-toc-panel {
  max-height: calc(100vh - 170px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--pt-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(21, 53, 74, 0.1);
  backdrop-filter: blur(12px);
}

.pt-toc-panel strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
}

.pt-toc-panel ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pt-toc-panel li.is-level-3 {
  padding-left: 13px;
}

.pt-toc-panel a {
  display: block;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--pt-muted);
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
}

.pt-toc-panel a:hover,
.pt-toc-panel a.is-current {
  background: #e7f6fd;
  color: var(--pt-deep);
}

.pt-reading-float {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 90;
  display: grid;
  gap: 8px;
}

.pt-reading-float button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--pt-line);
  border-radius: 14px;
  background: #fff;
  color: var(--pt-deep);
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(21, 53, 74, 0.12);
  cursor: pointer;
}

.pt-reading-float button:hover {
  border-color: var(--pt-blue);
  background: var(--pt-blue);
  color: #fff;
  transform: translateY(-2px);
}

/* 关于我们和合作表单 */
.pt-about-content {
  padding: 34px 38px;
}

.pt-about-contact {
  margin-top: 20px;
  padding: 32px 38px;
}

.pt-about-contact h2 {
  margin: 0 0 7px;
  font-size: 27px;
}

.pt-about-contact > p {
  margin: 0;
  color: #cfe2eb;
}

.pt-contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  width: 100%;
  margin-top: 20px;
}

.pt-form-trap,
.pt-form-trap[hidden] {
  position: absolute;
  left: -10000px;
  display: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pt-contact-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.pt-contact-field > span {
  font-weight: 700;
}

.pt-contact-field b {
  color: #ff827d;
}

.pt-contact-field input,
.pt-contact-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--pt-ink);
  font: inherit;
}

.pt-contact-field input:focus,
.pt-contact-field textarea:focus {
  border-color: var(--pt-green);
  box-shadow: 0 0 0 4px rgba(84, 183, 122, 0.18);
  outline: 0;
}

.pt-contact-message {
  grid-column: 1 / -1;
}

.pt-contact-message textarea {
  min-height: 180px;
  resize: vertical;
}

.pt-contact-consent {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

.pt-contact-consent input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 2px 0 0;
  border: 2px solid #a9c5d2;
  border-radius: 6px;
  accent-color: var(--pt-green);
}

.pt-contact-consent span {
  line-height: 1.55;
}

.pt-contact-consent a {
  color: #9de0b5;
}

.pt-contact-form > button {
  justify-self: start;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--pt-green);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 9px 22px rgba(84, 183, 122, 0.22);
  cursor: pointer;
}

.pt-contact-form > button:hover {
  background: #45a66a;
  transform: translateY(-2px);
}

@media (max-width: 1480px) {
  .pt-reading-toc {
    position: static;
    width: 100%;
    margin-top: 24px;
  }

  .pt-toc-toggle {
    display: inline-flex;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--pt-deep);
    color: #fff;
    font-weight: 750;
  }

  .pt-toc-panel {
    display: none;
    margin-top: 10px;
  }

  .pt-reading-toc.is-open .pt-toc-panel {
    display: block;
  }
}

@media (max-width: 900px) {
  .pt-managed-nav {
    display: none;
  }

  .pt-managed-mobile {
    display: block;
  }
}

@media (max-width: 782px) {
  .pt-hero-slide-custom h1 {
    font-size: 29px;
  }

  .pt-home-heading h2 {
    font-size: 25px;
  }

  .pt-archive-hero h1,
  .pt-about-hero h1,
  .pt-article-hero h1,
  .pt-detail-summary h1 {
    font-size: 28px;
  }

  .pt-about-hero.has-pt-header-image,
  .pt-archive-hero.has-pt-header-image,
  .pt-standard-page-hero.has-pt-header-image {
    min-height: 230px;
  }

  .pt-standard-page-hero {
    padding: 30px 24px;
  }

  .pt-reading-float {
    right: 12px;
    bottom: 16px;
  }

  .pt-contact-form {
    grid-template-columns: 1fr;
  }

  .pt-contact-message,
  .pt-contact-consent {
    grid-column: auto;
  }

  .pt-about-content,
  .pt-about-contact {
    padding: 26px 20px;
  }
}

@media print {
  .pt-reading-toc,
  .pt-reading-float {
    display: none;
  }
}
