:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #657083;
  --line: #e6eaf1;
  --accent: #2b5cff;
  --accent-soft: #eef3ff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(16,24,40,.07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header, .site-footer {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; margin-top: 40px; }
.header-inner, .footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0;
}
.site-branding { display: flex; align-items: center; gap: 14px; }
.site-title { display: block; font-size: 1.35rem; font-weight: 700; color: var(--text); }
.site-description { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.site-nav ul { list-style: none; display: flex; gap: 18px; padding: 0; margin: 0; }
.site-main { padding: 32px 0; }
.content-area { display: block; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.archive-header { padding: 24px; margin-bottom: 24px; }
.archive-title, .single-title { margin: 0 0 8px; font-size: clamp(1.7rem, 2vw, 2.4rem); line-height: 1.2; }
.archive-description { color: var(--muted); }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.thumb-link img, .single-thumb img { width: 100%; object-fit: cover; }
.card-body { padding: 18px; }
.meta-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.date { color: var(--muted); font-size: .92rem; }
.entry-title { margin: 0; font-size: 1.35rem; line-height: 1.35; }
.entry-title a { color: var(--text); }
.entry-secondary-title {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 1rem;
  font-weight: 600;
  color: #273142;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry-excerpt { margin-top: 12px; color: var(--muted); }
.book-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.book-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: .86rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
}
.single-card { padding: 24px; }
.entry-content { font-size: 1.05rem; }
.bottom-tags { margin-top: 20px; }
.widget { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 0 0 20px; }
.widget-title { margin-top: 0; }
.navigation.pagination { margin-top: 26px; }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.navigation.pagination a, .navigation.pagination span {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
}
.navigation.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (max-width: 820px) {
  .header-inner, .footer-inner, .site-nav ul { flex-direction: column; align-items: flex-start; }
  .wrap { width: min(100% - 20px, 1180px); }
  .site-main { padding: 20px 0; }
  .archive-header, .single-card, .card-body { padding: 16px; }
}


/* SEO / accessibility / breadcrumb / cleaner structure */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  clip: auto;
  width: auto;
  height: auto;
  margin: 12px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 9999;
}
.bbt-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .95rem;
}
.bbt-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bbt-breadcrumbs a {
  color: var(--muted);
}
.bbt-breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: none;
}
.bbt-breadcrumb-sep {
  color: #98a2b3;
}
.card article,
.entry-content > *:first-child {
  margin-top: 0;
}
.entry-content > *:last-child {
  margin-bottom: 0;
}
.single-card .entry-content,
.archive-description,
.entry-excerpt,
.entry-secondary-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}


.bbt-download-heading {
  margin: .35rem 0 .2rem;
  font-size: 1.1rem;
  line-height: 1.7;
  font-weight: 800;
}

.bbt-download-note {
  margin: 0 0 .65rem;
  font-size: .98rem;
  line-height: 1.8;
  opacity: .92;
}

.archive-header .bbt-download-heading,
.archive-header .bbt-download-note,
.single-card .bbt-download-heading,
.single-card .bbt-download-note,
.card-body .bbt-download-heading,
.card-body .bbt-download-note {
  text-align: right;
}



.bbt-featured-visual {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--line);
  background: #dde7ff;
  box-shadow: var(--shadow);
}
.bbt-featured-visual img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}
.bbt-featured-visual-card {
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.archive-header .bbt-featured-visual,
.single-card .bbt-featured-visual {
  margin: 14px 0 0;
}
.bbt-featured-visual-link {
  display: block;
}
.bbt-featured-visual-link:hover {
  text-decoration: none;
}


.related-books {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.related-subtitle {
  margin: 0 0 12px;
  font-size: 1.02rem;
  line-height: 1.7;
}
.related-term-block + .related-post-block {
  margin-top: 18px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.related-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.related-card-title,
.related-card-note {
  padding-inline: 14px;
}
.related-card-title {
  margin: 12px 0 6px;
  font-size: 1rem;
  line-height: 1.7;
}
.related-card-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .95rem;
}


/* v1.5.5 layout refinements */
.single-area .single-card > .bbt-featured-visual,
.single-card > .bbt-featured-visual-hero {
  max-width: 760px;
  margin: 18px auto 22px;
  border-radius: 22px;
}
.single-card > .bbt-featured-visual img,
.single-card > .bbt-featured-visual-hero img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: contain;
  background: linear-gradient(135deg, #0f1f3f, #132a57);
}
.tag-full-post > .bbt-featured-visual,
.tag-full-post > .bbt-featured-visual-hero {
  max-width: 760px;
  margin: 18px auto 22px;
}
.home .posts-grid,
.blog .posts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .home .posts-grid,
  .blog .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .home .posts-grid,
  .blog .posts-grid {
    grid-template-columns: 1fr;
  }
  .single-area .single-card > .bbt-featured-visual,
  .single-card > .bbt-featured-visual-hero,
  .tag-full-post > .bbt-featured-visual,
  .tag-full-post > .bbt-featured-visual-hero {
    max-width: 100%;
  }
}


/* v1.5.6 logo and dynamic image fixes */
.custom-logo-link,
.custom-logo-link img,
.custom-logo {
  display: block;
}
.custom-logo-link img,
.custom-logo {
  width: auto;
  max-width: 100%;
  max-height: 68px;
  height: auto;
}
.site-branding {
  min-width: 0;
}
.site-branding > div {
  min-width: 0;
}
.site-title,
.site-description {
  overflow-wrap: anywhere;
}
@media (min-width: 1200px) {
  .custom-logo-link img,
  .custom-logo {
    max-height: 56px;
  }
}
@media (max-width: 700px) {
  .custom-logo-link img,
  .custom-logo {
    max-height: 52px;
  }
}
