/*
Theme Name: Bee Tech Blog
Theme URI: https://example.com/bee-tech-blog
Description: 技术博客子主题，采用软件下载站式双栏信息架构。
Author: Bee
Template: twentytwentyfive
Version: 0.2.0
Text Domain: bee-tech-blog
*/

:root {
  --bee-bg: #ececec;
  --bee-surface: #ffffff;
  --bee-surface-soft: #f7f7f7;
  --bee-nav: #2f3338;
  --bee-accent: #c61d1d;
  --bee-accent-dark: #ab1717;
  --bee-border: #dddddd;
  --bee-border-strong: #cfcfcf;
  --bee-text: #222222;
  --bee-heading: #111111;
  --bee-muted: #777777;
  --bee-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bee-bg);
  color: var(--bee-text);
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.wp-site-blocks {
  padding-top: 0;
  padding-bottom: 0;
}

a {
  text-decoration: none;
}

.bee-site-shell {
  background: var(--bee-bg);
}

.bee-top-nav {
  background: var(--bee-nav);
  border-bottom: 1px solid #272b2f;
}

.bee-top-nav__inner {
  min-height: 56px;
  gap: 14px;
  padding-top: 0;
  padding-bottom: 0;
}

.bee-site-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.bee-site-logo__mark {
  display: inline-block;
  color: #f7f7f7;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", serif;
}

.bee-header-tools {
  flex: 1 1 auto;
  min-width: 0;
  gap: 0;
  justify-content: flex-end;
  align-self: stretch;
}

.bee-cat-nav {
  min-width: 0;
}

.bee-cat-nav--header {
  flex: 0 0 auto;
}

.bee-main-menu {
  display: flex;
}

.bee-main-menu__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 56px;
  padding: 0 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.bee-main-menu__item:hover,
.bee-main-menu__item--home {
  background: var(--bee-accent);
  color: #ffffff;
}

.bee-cat-nav .wp-block-categories-list {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 0;
}

.bee-cat-nav .cat-item {
  margin: 0;
}

.bee-cat-nav .cat-item a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  min-height: 56px;
  padding: 0 14px;
  background: transparent;
  border-left: 1px solid #43484d;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.bee-cat-nav .cat-item a:hover,
.bee-cat-nav .current-cat a {
  background: var(--bee-accent);
  border-color: #43484d;
  color: #ffffff;
}

.bee-search-popover {
  position: relative;
  flex: 0 0 auto;
}

.bee-search-toggle,
.bee-search-submit {
  min-width: 56px;
  min-height: 58px;
  border: 0;
  border-left: 1px solid #43484d;
  background: transparent;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.bee-search-toggle:hover,
.bee-search-toggle[aria-expanded="true"] {
  background: #383d42;
}

.bee-search-submit {
  min-width: 76px;
  min-height: 36px;
  border: 1px solid var(--bee-accent);
  background: var(--bee-accent);
  font-size: 13px;
  font-weight: 400;
  padding: 0 14px;
}

.bee-search-submit:hover {
  background: var(--bee-accent-dark);
}

.bee-search-form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: none;
  width: 320px;
  max-width: calc(100vw - 24px);
  border: 1px solid var(--bee-border-strong);
  background: var(--bee-surface);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  padding: 10px;
}

.bee-search-popover.is-open .bee-search-form {
  display: flex;
}

.bee-search-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 32px;
  border: 1px solid var(--bee-border);
  border-right: 0;
  padding: 0 10px;
  font-size: 13px;
  color: var(--bee-text);
  background: #ffffff;
}

.bee-quick-bar {
  border-bottom: 1px solid var(--bee-border);
  background: var(--bee-surface);
}

body.home .bee-quick-bar,
body.blog .bee-quick-bar {
  display: none;
}

.bee-quick-bar__inner {
  padding-top: 8px;
  padding-bottom: 8px;
}

.bee-quick-links {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--bee-muted);
}

.bee-quick-links__label {
  flex: 0 0 auto;
  color: #444444;
}

.bee-quick-links__items {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.bee-quick-links__items a {
  color: var(--bee-accent);
}

.bee-quick-links__items a:hover {
  color: var(--bee-accent-dark);
  text-decoration: underline;
}

.bee-banner-wrap {
  margin-top: 14px;
  margin-bottom: 14px;
  overflow: hidden;
}

.bee-banner-image {
  margin: 0;
}

.bee-banner-image img {
  display: block;
  width: 100%;
  height: min(210px, 18vw);
  min-height: 132px;
  border: 1px solid var(--bee-border);
  background: var(--bee-surface);
  object-fit: cover;
}

.bee-main-grid {
  align-items: flex-start;
  gap: 14px;
  margin-top: 0;
  margin-bottom: 0;
}

.bee-main-grid > .wp-block-column {
  min-width: 0;
}

.bee-section-head {
  min-height: 40px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 1px solid var(--bee-border);
  border-left: 4px solid var(--bee-accent);
  background: var(--bee-surface);
}

.bee-section-head h3,
.bee-section-head .wp-block-query-title {
  margin: 0;
  color: var(--bee-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.bee-post-list-wrap,
.bee-single-wrap,
.bee-sidebar-card,
.bee-breadcrumb {
  border: 1px solid var(--bee-border);
  background: var(--bee-surface);
  box-shadow: none;
}

.bee-post-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  padding: 11px 14px 12px;
  border-bottom: 1px solid #ededed;
}

.bee-post-row:last-child {
  border-bottom: 0;
}

.bee-post-row .wp-block-post-featured-image {
  grid-column: 1;
  grid-row: 1 / span 3;
  margin: 0;
}

.bee-post-row .wp-block-post-featured-image img,
.bee-post-thumb-placeholder__inner {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--bee-border);
  object-fit: cover;
  background: #f5f5f5;
}

.bee-post-thumb-placeholder__inner {
  color: #9b9b9b;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  padding-top: calc(28.125% - 14px);
}

.bee-post-row .wp-block-post-title {
  grid-column: 2;
  margin: 0;
}

.bee-post-row .wp-block-post-title a {
  color: var(--bee-heading);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
}

.bee-post-row:not(:first-child) .wp-block-post-title a {
  font-size: 17px;
}

.bee-post-row .wp-block-post-title a:hover {
  color: var(--bee-accent);
}

.bee-post-meta {
  grid-column: 2;
  gap: 8px;
  margin-top: 6px;
  color: var(--bee-muted);
  font-size: 12px;
}

.bee-post-meta .wp-block-post-author-name,
.bee-post-meta .wp-block-post-date,
.bee-post-meta .wp-block-post-terms,
.bee-single-meta .wp-block-post-author-name,
.bee-single-meta .wp-block-post-date,
.bee-single-meta .wp-block-post-terms {
  color: inherit;
  font-size: inherit;
}

.bee-post-meta a,
.bee-single-meta a,
.bee-breadcrumb a {
  color: inherit;
}

.bee-post-meta a:hover,
.bee-single-meta a:hover,
.bee-breadcrumb a:hover {
  color: var(--bee-accent);
}

.bee-post-row .wp-block-post-excerpt {
  display: block;
  grid-column: 2;
  margin-top: 6px;
  color: #4f4f4f;
  font-size: 12px;
  line-height: 1.7;
}

.bee-post-row .wp-block-post-excerpt p {
  margin: 0;
}

.bee-post-row .wp-block-post-excerpt__more-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--bee-accent);
  font-size: 14px;
}

.wp-block-query-pagination {
  gap: 8px;
  padding: 14px 18px 18px;
  border-top: 1px solid #ededed;
  font-size: 13px;
}

.wp-block-query-pagination a,
.wp-block-query-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--bee-border);
  background: #ffffff;
  color: #555555;
}

.wp-block-query-pagination a:hover,
.wp-block-query-pagination .current {
  border-color: var(--bee-accent);
  background: var(--bee-accent);
  color: #ffffff;
}

.bee-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bee-sidebar-card {
  padding: 9px 11px 11px;
}

.bee-sidebar-card h2 {
  margin: 0 0 8px;
  padding: 0 0 7px 8px;
  border-left: 4px solid var(--bee-accent);
  border-bottom: 1px solid #eeeeee;
  color: var(--bee-heading);
  font-size: 15px;
  line-height: 1.3;
}

.bee-sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: bee-sidebar-rank;
}

.bee-sidebar-links li {
  position: relative;
  margin: 0;
  padding: 8px 0 8px 26px;
  border-bottom: 1px dashed #ececec;
}

.bee-sidebar-links li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.bee-sidebar-links li::before {
  counter-increment: bee-sidebar-rank;
  content: counter(bee-sidebar-rank);
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: var(--bee-accent);
  color: #ffffff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.bee-sidebar-links--compact li::before {
  background: #8b8b8b;
}

.bee-sidebar-links a {
  color: #333333;
  font-size: 13px;
  line-height: 1.55;
}

.bee-sidebar-links a:hover {
  color: var(--bee-accent);
}

.bee-sidebar-links--posts {
  counter-reset: none;
}

.bee-sidebar-links--posts li {
  padding-left: 0;
}

.bee-sidebar-links--posts li::before {
  display: none;
}

.bee-sidebar-links--posts a {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.bee-sidebar-media__thumb {
  display: block;
}

.bee-sidebar-media__thumb img,
.bee-mini-thumb {
  display: block;
  width: 66px;
  height: 50px;
  border: 1px solid var(--bee-border);
  object-fit: cover;
  background: #f4f4f4;
}

.bee-mini-thumb {
  align-items: center;
  justify-content: center;
  color: #9a9a9a;
  font-size: 12px;
  font-weight: 700;
  line-height: 50px;
  text-align: center;
}

.bee-sidebar-media__title {
  display: block;
  color: #333333;
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.bee-sidebar-follow__image img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--bee-border);
  background: #ffffff;
}

.bee-sidebar-follow__image--placeholder {
  display: flex;
  justify-content: center;
}

.bee-sidebar-follow__placeholder,
.bee-sidebar-follow__placeholder-link {
  display: block;
  width: min(100%, 220px);
}

.bee-sidebar-follow__placeholder {
  position: relative;
  min-height: 220px;
  padding: 22px 18px;
  border: 1px solid var(--bee-border);
  background:
    linear-gradient(90deg, #ececec 0, #ececec 1px, transparent 1px, transparent 33.333%),
    linear-gradient(#ececec 0, #ececec 1px, transparent 1px, transparent 33.333%),
    linear-gradient(135deg, #ffffff 0%, #f4f4f4 100%);
  background-size: 33.333% 100%, 100% 33.333%, 100% 100%;
  color: #666666;
  text-align: center;
}

.bee-sidebar-follow__placeholder span,
.bee-sidebar-follow__placeholder strong {
  display: block;
}

.bee-sidebar-follow__placeholder span {
  margin-top: 124px;
  font-size: 12px;
  letter-spacing: 0;
}

.bee-sidebar-follow__placeholder strong {
  margin-top: 6px;
  color: #222222;
  font-size: 16px;
}

.bee-sidebar-follow__text {
  margin: 9px 0 0;
  color: #555555;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.bee-breadcrumb-wrap {
  margin-top: 14px;
  margin-bottom: 12px;
}

.bee-breadcrumb {
  gap: 8px;
  padding: 8px 12px;
  border-left: 4px solid var(--bee-accent);
  color: #666666;
  font-size: 12px;
  line-height: 1.6;
}

.bee-breadcrumb p {
  margin: 0;
}

.bee-single-wrap {
  padding: 14px 18px 22px;
}

.bee-single-title {
  margin: 0 0 4px;
  color: #4a4a4a;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 700;
}

.bee-single-meta {
  gap: 8px;
  margin-bottom: 8px;
  color: var(--bee-muted);
  font-size: 12px;
}

.bee-single-intro {
  margin: 0 0 12px;
  color: #555555;
  font-size: 13px;
  line-height: 1.85;
}

.bee-single-intro p {
  margin: 0;
}

.bee-single-cover {
  margin: 0 0 14px;
}

.bee-single-cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--bee-border);
}

.bee-single-wrap .wp-block-post-content {
  color: #2a2a2a;
  font-size: 14px;
  line-height: 1.85;
}

.bee-single-wrap .wp-block-post-content > h1:first-child {
  display: none;
}

.bee-single-wrap .wp-block-post-content h2,
.bee-single-wrap .wp-block-post-content h3,
.bee-single-wrap .wp-block-post-content h4 {
  color: var(--bee-heading);
  line-height: 1.45;
  margin-top: 1.5em;
  margin-bottom: 0.65em;
}

.bee-single-wrap .wp-block-post-content h2 {
  font-size: 21px;
}

.bee-single-wrap .wp-block-post-content h3 {
  font-size: 18px;
}

.bee-single-wrap .wp-block-post-content p,
.bee-single-wrap .wp-block-post-content ul,
.bee-single-wrap .wp-block-post-content ol,
.bee-single-wrap .wp-block-post-content blockquote {
  margin-top: 0;
  margin-bottom: 1.1em;
}

.bee-single-wrap .wp-block-post-content a {
  color: var(--bee-accent);
}

.bee-single-wrap .wp-block-post-content a:hover {
  color: var(--bee-accent-dark);
}

.bee-single-wrap .wp-block-post-content img {
  display: block;
  width: auto;
  max-width: min(760px, 100%);
  height: auto;
  margin: 18px auto;
  border: 1px solid var(--bee-border);
}

.bee-single-wrap .wp-block-post-content blockquote {
  margin-left: 0;
  padding: 10px 14px;
  border: 1px solid #eeeeee;
  border-left: 3px solid var(--bee-accent);
  background: #fafafa;
  color: #444444;
}

.bee-single-wrap .wp-block-post-content pre,
.bee-single-wrap .wp-block-post-content code {
  font-family: Consolas, Monaco, "Courier New", monospace;
}

.bee-single-wrap .wp-block-post-content pre {
  overflow-x: auto;
  padding: 12px 14px;
  border: 1px solid #e7e7e7;
  background: #fafafa;
  font-size: 13px;
  line-height: 1.65;
}

.bee-article-template {
  padding: 8px 11px;
  border: 1px solid #f0f0f0;
  border-left: 3px solid #e5e5e5;
  background: #fbfbfb;
  color: #4b4b4b;
  font-size: 12px;
  line-height: 1.7;
}

.bee-article-before-template {
  margin-bottom: 10px;
}

.bee-article-after-template {
  margin-top: 14px;
}

.bee-article-template p:last-child,
.bee-article-template ul:last-child {
  margin-bottom: 0;
}

.bee-article-template h2,
.bee-article-template h3 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.4;
}

.bee-search-empty {
  color: #666666;
  font-size: 15px;
}

.bee-single-extras {
  margin-top: 26px;
}

.bee-single-tags {
  padding-top: 12px;
  border-top: 1px solid #ececec;
}

.bee-single-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 8px 8px 0;
  padding: 0 10px;
  border: 1px solid var(--bee-border);
  background: #fafafa;
  color: #666666;
  font-size: 13px;
}

.bee-single-tags a:hover {
  border-color: var(--bee-accent);
  color: var(--bee-accent);
}

.bee-single-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.bee-single-nav__item {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--bee-border);
  background: #fafafa;
  color: #666666;
  font-size: 13px;
  line-height: 1.7;
}

.bee-single-nav__item--next {
  text-align: right;
}

.bee-single-nav__item a,
.bee-single-nav__item span {
  color: inherit;
}

.bee-single-nav__item a:hover {
  color: var(--bee-accent);
}

.bee-related-posts {
  margin-top: 18px;
}

.bee-related-posts h2 {
  margin: 0 0 12px;
  padding: 0 0 8px 8px;
  border-left: 4px solid var(--bee-accent);
  border-bottom: 1px solid #ececec;
  color: var(--bee-heading);
  font-size: 18px;
  line-height: 1.3;
}

.bee-related-posts__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bee-related-post {
  min-width: 0;
}

.bee-related-post__thumb {
  display: block;
  margin-bottom: 7px;
}

.bee-related-post__thumb img,
.bee-related-posts__thumb-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--bee-border);
  object-fit: cover;
  background: #f4f4f4;
}

.bee-related-posts__thumb-placeholder {
  color: #9a9a9a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  padding-top: calc(28.125% - 7px);
}

.bee-related-post h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 700;
}

.bee-related-post h3 a {
  color: var(--bee-heading);
}

.bee-related-post h3 a:hover {
  color: var(--bee-accent);
}

.bee-footer {
  margin-top: 26px;
  border-top: 1px solid var(--bee-border);
  background: var(--bee-surface);
  color: #666666;
}

.bee-footer__inner {
  min-height: 52px;
  gap: 12px;
}

.bee-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  color: #666666;
  font-size: 12px;
  line-height: 1.7;
}

.bee-footer__meta a {
  color: #666666;
}

.bee-footer__meta a:hover {
  color: var(--bee-accent);
}

@media (max-width: 1100px) {
  .bee-top-nav__inner {
    flex-wrap: wrap !important;
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .bee-header-tools {
    width: 100%;
    justify-content: flex-end;
  }

  .bee-main-grid {
    gap: 16px;
  }

  .bee-post-row {
    grid-template-columns: 148px minmax(0, 1fr);
  }

  .bee-post-row .wp-block-post-title a {
    font-size: 16px;
  }

  .bee-post-row:not(:first-child) .wp-block-post-title a {
    font-size: 16px;
  }

  .bee-single-title {
    font-size: 18px;
  }
}

@media (max-width: 781px) {
  .bee-top-nav__inner {
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .bee-site-logo__mark {
    font-size: 20px;
    max-width: min(280px, calc(100vw - 32px));
  }

  .bee-header-tools {
    flex-wrap: wrap !important;
    justify-content: flex-end;
  }

  .bee-cat-nav--header {
    width: auto;
  }

  .bee-cat-nav .wp-block-categories-list {
    gap: 0;
  }

  .bee-quick-links {
    display: block;
  }

  .bee-quick-links__label {
    display: block;
    margin-bottom: 4px;
  }

  .bee-search-form {
    left: 0;
    right: auto;
    width: min(320px, calc(100vw - 24px));
  }

  .bee-main-menu__item,
  .bee-cat-nav .cat-item a,
  .bee-search-toggle {
    min-width: 52px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
  }

  .bee-search-toggle {
    font-size: 18px;
  }

  .bee-main-grid {
    display: block;
  }

  .bee-main-grid__content,
  .bee-main-grid__sidebar {
    flex-basis: 100% !important;
  }

  .bee-main-grid__sidebar {
    margin-top: 16px;
  }

  .bee-section-head {
    padding-left: 12px;
    padding-right: 12px;
  }

  .bee-section-head h3,
  .bee-section-head .wp-block-query-title {
    font-size: 16px;
  }

  .bee-post-row {
    grid-template-columns: 1fr;
    row-gap: 8px;
    padding: 14px 14px 16px;
  }

  .bee-post-row .wp-block-post-featured-image,
  .bee-post-row .wp-block-post-title,
  .bee-post-row .bee-post-meta,
  .bee-post-row .wp-block-post-excerpt {
    grid-column: auto;
    grid-row: auto;
  }

  .bee-post-row .wp-block-post-title a,
  .bee-post-row:not(:first-child) .wp-block-post-title a {
    font-size: 17px;
  }

  .bee-post-row .wp-block-post-excerpt {
    font-size: 14px;
  }

  .bee-post-thumb-placeholder__inner {
    font-size: 22px;
    padding-top: calc(28.125% - 11px);
  }

  .bee-single-wrap {
    padding: 16px 14px 22px;
  }

  .bee-single-title {
    font-size: 17px;
  }

  .bee-single-wrap .wp-block-post-content {
    font-size: 14px;
  }

  .bee-single-wrap .wp-block-post-content h2 {
    font-size: 19px;
  }

  .bee-single-wrap .wp-block-post-content h3 {
    font-size: 17px;
  }

  .bee-single-nav {
    grid-template-columns: 1fr;
  }

  .bee-single-nav__item--next {
    text-align: left;
  }

  .bee-related-posts__grid {
    grid-template-columns: 1fr;
  }

  .wp-block-query-pagination {
    padding-left: 14px;
    padding-right: 14px;
  }
}
