.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 26px 0 10px;
}
.site-branding {
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(255,253,251,.95), rgba(249,241,233,.96));
  border: 1px solid rgba(234,223,213,.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.site-title { margin: 0; font-size: clamp(1.8rem, 3vw, 2.8rem); }
.site-title a { color: #2f2824; }
.site-description { margin: .6rem 0 0; color: var(--muted); max-width: 58ch; }
.toggle-navigation {
  display: none;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(234,223,213,.9);
  background: rgba(255,253,251,.95);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  color: var(--text);
  cursor: pointer;
}
.menu-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  margin-top: 8px;
  background: rgba(255,253,251,.8);
  border: 1px solid rgba(234,223,213,.9);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.menu-container ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 0; margin: 0; }
.menu-container li { margin: 0; }
.menu-container a {
  display: inline-flex;
  align-items: center;
  padding: .6rem .9rem;
  border-radius: 999px;
  color: var(--text);
}
.menu-container a:hover,
.menu-container .current-menu-item > a,
.menu-container .active > a {
  background: rgba(232,198,169,.28);
  color: #8d5a31;
}
.header-socials { margin-left: auto; }
.context-banner,
.post-card,
.post.entry,
.widget {
  background: linear-gradient(180deg, rgba(255,253,251,.96), rgba(251,248,244,.96));
  border: 1px solid rgba(234,223,213,.9);
  box-shadow: var(--shadow-soft);
}
.context-banner {
  padding: 22px 26px;
  border-radius: var(--radius-lg);
}
.context-banner h1 { margin-bottom: .35rem; }
.context-banner-text { color: var(--muted); }
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}
.post-card {
  border-radius: 24px;
  overflow: hidden;
}
.post-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: #efe7df;
}
.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-media img { transform: scale(1.03); }
.thumb-icon {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(64,56,51,.75);
  color: #fff;
}
.post-card-body { padding: 18px 20px 20px; }
.post-card-meta-top,
.entry-meta-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: .95rem;
}
.post-card-category {
  color: #8d5a31;
}
.post-card-title {
  font-size: 1.55rem;
  margin: .7rem 0 .8rem;
}
.post-card-title a { color: #2f2824; }
.post-card-excerpt { color: #5e534c; }
.post-card-footer { margin-top: 1rem; }
.entry-identity { margin-top: .9rem; }
.post-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.post-id,
.level-badge {
  display: inline-flex;
  align-items: center;
  padding: .42rem .78rem;
  border-radius: 999px;
  font-size: .83rem;
  border: 1px solid rgba(234,223,213,.95);
  background: #fff9f4;
  color: var(--muted);
}
.level-beginner { background: #f0f4ef; color: #577252; }
.level-intermediate { background: #fff7dc; color: #91722c; }
.level-advanced { background: #fff0e5; color: #b15f2d; }
.level-neutral { background: #f6f0ea; color: #766760; }
.sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
}
.widget {
  border-radius: 22px;
  padding: 20px;
}
.widget-title {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}
.search-form-container input,
.search-404 input,
.themeform input[type="text"],
.themeform input[type="search"] {
  width: 100%;
  padding: .9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffdfa;
}
.tab-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tab-nav-four { grid-template-columns: repeat(4, 1fr); }
.tab-button {
  border: 1px solid var(--line);
  background: #fffaf5;
  color: var(--muted);
  border-radius: 12px;
  padding: .68rem .7rem;
  cursor: pointer;
}
.tab-button.active { background: rgba(232,198,169,.28); color: #8d5a31; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.widget ul { margin: 0; padding-left: 1.1rem; }
.widget li { margin: .3rem 0; }
.post.entry {
  border-radius: 28px;
  overflow: hidden;
}
.single-entry-inner { padding: 26px 30px 30px; }
.entry-title { margin-bottom: .8rem; }
.entry-media .single-media:not(:last-child) { margin-bottom: 1rem; }
.featured-image img { width: 100%; max-height: 580px; object-fit: cover; }
.entry-content {
  max-width: var(--content-width);
  margin: 0 auto;
  font-size: 1.08rem;
}
.entry-content article > *:first-child { margin-top: 0; }
.entry-content h2,
.entry-content h3,
.entry-content h4 { margin-top: 1.8rem; }
.entry-footer {
  max-width: var(--content-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.entry-tags { color: var(--muted); margin-bottom: 1.25rem; }
.further-reading {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 1rem 0 1.5rem;
}
.further-reading p {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf5;
}
.further-reading span { display: block; color: var(--muted); font-size: .88rem; margin-bottom: .3rem; }
.author-bio {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: #fffaf5;
  border: 1px solid var(--line);
}
.bio-avatar img { width: 72px; height: 72px; object-fit: cover; border-radius: 999px; }
.bio-name { font-weight: 700; margin: 0 0 .35rem; }
.loop-pagination-container { margin-top: 20px; }
.loop-pagination, .wp-pagenavi { display: flex; gap: 10px; flex-wrap: wrap; }
.loop-pagination a, .loop-pagination span, .wp-pagenavi a, .wp-pagenavi span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: .7rem .9rem;
  border-radius: 999px;
  background: rgba(255,253,251,.9);
  border: 1px solid rgba(234,223,213,.95);
}
.related-posts h2 { margin: 1.8rem 0 1rem; }
.comments-area { margin-top: 1.6rem; }
@media (max-width: 980px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; }
  .toggle-navigation { display: inline-flex; }
  .menu-container {
    display: none;
    grid-column: 1 / -1;
    border-radius: 24px;
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
  }
  .menu-container.open { display: flex; }
  .menu-container ul { flex-direction: column; }
}
@media (max-width: 700px) {
  .post-grid { grid-template-columns: 1fr; }
  .single-entry-inner { padding: 22px 18px 24px; }
  .further-reading,
  .author-bio { grid-template-columns: 1fr; }
}

.toggle-search {
  display: none;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(234,223,213,.9);
  background: rgba(255,253,251,.95);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  color: var(--text);
  cursor: pointer;
}
.toggle-search .icon-close { display: none; }
.toggle-search.active .icon-search { display: none; }
.toggle-search.active .icon-close { display: inline-block; }
.search-expand {
  display: none;
  grid-column: 1 / -1;
}
.search-expand.open { display: block; }
.search-expand-inner {
  padding: 0;
}
.search-expand .themeform.searchform div {
  position: relative;
}
.search-expand .themeform.searchform div:before {
  content: "\f002";
  font-family: FontAwesome;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b7b72;
  font-size: 16px;
}
.search-expand .themeform.searchform div input {
  width: 100%;
  padding: 1rem 1rem 1rem 2.9rem;
  border-radius: 18px;
  border: 1px solid rgba(234,223,213,.9);
  background: rgba(255,253,251,.98);
  box-shadow: var(--shadow-soft);
}
@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 54px 1fr 54px;
    gap: 10px;
    align-items: center;
    position: relative;
    padding: 14px 0 10px;
  }
  .site-branding {
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 8px 56px 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: center;
  }
  .site-title {
    padding: 10px 0;
    margin: 0;
    width: 100%;
    line-height: 50px;
    border-bottom: 1px solid #eee3d8;
    font-size: clamp(2rem, 7vw, 2.4rem);
  }
  .site-title a {
    display: block;
    text-align: center;
  }
  .site-description {
    margin: .35rem auto 0;
    max-width: 34ch;
    font-size: .95rem;
  }
  .toggle-search,
  .toggle-navigation {
    display: inline-flex;
    grid-row: 1;
    z-index: 3;
    width: auto;
    height: auto;
    background: none;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 10px 12px;
    color: #333;
    margin: 0;
    align-self: start;
    margin-top: 2px;
  }
  .toggle-search {
    grid-column: 1;
    justify-self: start;
  }
  .toggle-navigation {
    grid-column: 3;
    justify-self: end;
  }
  .menu-container {
    margin-top: 0;
    border-radius: 22px;
  }
  .search-expand {
    grid-column: 1 / -1;
    margin-top: -1px;
  }
  .search-expand .themeform.searchform div input {
    border-radius: 0;
    padding: 22px 22px 22px 60px;
    border-left: 0;
    border-right: 0;
  }
  .search-expand .themeform.searchform div:before {
    left: 26px;
    font-size: 18px;
  }
}


.level-badge-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .75;
}
.level-inline {
  padding: .32rem .72rem;
  font-size: .8rem;
  border-color: transparent;
}
.entry-meta-top .level-inline {
  transform: translateY(-1px);
}
.entry-header .post-badges {
  gap: 10px;
}
.entry-header .post-id {
  background: #f7f1eb;
  color: #7d6b62;
}
.level-list {
  list-style: none;
  padding-left: 0 !important;
  margin: 0;
}
.level-list li {
  margin: .4rem 0;
}
.level-list a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
