:root {
  --blog-bg: #f7f9fb;
  --blog-surface: #ffffff;
  --blog-card: #ffffff;
  --blog-text: #171a1d;
  --blog-muted: #6d747c;
  --blog-soft: #eef5f9;
  --blog-border: #e3e8ee;
  --blog-primary: #4f7f9d;
  --blog-primary-dark: #365f78;
  --blog-accent: #6f8fa5;
  --blog-shadow: 0 14px 32px rgba(31, 42, 55, 0.07);
  --blog-shadow-sm: 0 8px 22px rgba(31, 42, 55, 0.045);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  width: 100%;
}

body {
  min-height: 100%;
  width: 100%;
  background: var(--blog-bg);
  color: var(--blog-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

html,
body {
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: var(--blog-primary);
  text-decoration: none;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

a:hover {
  color: var(--blog-primary-dark);
}

.site-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid rgba(227, 232, 238, 0.9);
  box-shadow: 0 2px 12px rgba(31, 42, 55, 0.04);
}

.navbar {
  min-height: 62px;
  padding-block: 0.3rem;
}

.header-container {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  margin-inline: auto;
  max-width: 1680px;
  padding-inline: clamp(0.85rem, 2.4vw, 2rem);
  width: 100%;
}

.navbar-collapse {
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  color: var(--blog-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  padding-block: 0;
}

.navbar-brand:hover {
  color: var(--blog-primary);
}

.site-logo {
  display: block;
  width: auto;
  height: 46px;
  max-width: min(30vw, 140px);
  object-fit: contain;
}

.site-nav {
  flex: 0 0 auto;
  gap: 0.1rem;
  min-width: max-content;
}

.site-nav .nav-item {
  flex: 0 0 auto;
}

.navbar .nav-link {
  color: #666d75;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: normal;
  padding-inline: 0.48rem;
  white-space: nowrap !important;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

.navbar-nav {
  align-items: center;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--blog-text);
}

.dropdown-menu {
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  box-shadow: var(--blog-shadow-sm);
}

.dropdown-item {
  border-radius: 6px;
}

.site-search {
  gap: 0.45rem;
  align-items: center;
  flex: 0 1 280px;
  min-width: 190px;
}

.site-search .form-control {
  min-width: 0;
  width: clamp(120px, 13vw, 230px);
  background: #f8fafc;
  border-color: var(--blog-border);
  border-radius: 8px;
  color: var(--blog-text);
  height: 38px;
}

.site-search .btn {
  flex: 0 0 auto;
  min-width: 3.8rem;
  height: 38px;
  padding-inline: 0.75rem;
  white-space: nowrap;
}

.site-search .form-control:focus {
  background: #ffffff;
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.12);
}

.btn {
  border-radius: 8px;
  font-weight: 700;
}

.language-switcher {
  flex: 0 0 auto;
}

.language-switcher > .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-width: 4.45rem;
  min-height: 34px;
  padding-inline: 0.5rem;
  white-space: nowrap;
}

.language-switcher .dropdown-menu {
  min-width: 7.5rem;
}

.language-switcher .dropdown-item {
  font-weight: 700;
}

.navbar-collapse > .d-flex .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  line-height: 1.2;
  min-height: 34px;
  padding-inline: 0.45rem;
  white-space: nowrap !important;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

.navbar-collapse > .d-flex > .btn {
  min-width: 3.35rem;
}

.header-actions {
  flex: 0 0 auto;
  gap: 0.35rem !important;
  min-width: max-content;
}

.btn-primary {
  background: var(--blog-primary);
  border-color: var(--blog-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--blog-primary-dark);
  border-color: var(--blog-primary-dark);
}

.btn-outline-primary {
  color: var(--blog-primary);
  border-color: rgba(15, 118, 110, 0.45);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--blog-primary);
  border-color: var(--blog-primary);
  color: #ffffff;
}

.content-shell {
  width: 100%;
  flex: 1 0 auto;
  padding-top: 2.2rem;
  padding-bottom: 3rem;
}

.home-hero,
.page-heading {
  position: relative;
  overflow: hidden;
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  box-shadow: var(--blog-shadow-sm);
}

.home-hero {
  padding: clamp(2rem, 4.2vw, 3.25rem);
  text-align: center;
}

.home-hero::before {
  content: none;
}

.page-heading {
  padding: 1.4rem 1.5rem;
}

.eyebrow {
  color: var(--blog-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.display-title {
  color: var(--blog-text);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
}

.hero-subtitle {
  max-width: 46rem;
  margin-inline: auto;
  color: var(--blog-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.pillar-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.pillar-strip a,
.pillar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f1f6f9;
  border: 0;
  border-radius: 8px;
  color: var(--blog-text);
  min-height: 64px;
  padding: 0.8rem 0.95rem;
}

.pillar-strip a strong,
.pillar-item strong {
  line-height: 1.25;
  min-width: 0;
  text-align: left;
}

.pillar-strip a span,
.pillar-item small {
  color: var(--blog-primary);
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.article-card,
.side-panel,
.admin-panel {
  background: var(--blog-card);
  border: 1px solid var(--blog-border);
  border-radius: 8px;
}

.article-card {
  overflow: hidden;
  box-shadow: var(--blog-shadow-sm);
}

.article-card:hover {
  box-shadow: var(--blog-shadow);
}

.article-detail:hover {
  transform: none;
}

.article-cover {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(180, 83, 9, 0.12)),
    #e7ded0;
  object-fit: cover;
  width: 100%;
}

.article-card-body {
  border-top: 1px solid rgba(219, 227, 236, 0.8);
}

.article-meta {
  color: var(--blog-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.86rem;
  font-weight: 650;
}

.article-meta a {
  color: var(--blog-accent);
}

.article-meta time {
  color: #4c5965;
}

.article-meta-separator {
  color: #a4adb7;
}

.article-card-title,
.article-title {
  color: var(--blog-text);
  font-weight: 700;
  line-height: 1.18;
}

.article-card-title {
  font-size: 1.6rem;
}

.article-card-title a {
  color: inherit;
}

.article-card-title a:hover {
  color: var(--blog-primary);
}

.article-title {
  font-size: clamp(2rem, 4vw, 3rem);
}

.article-summary {
  color: #504a42;
  font-size: 1rem;
  line-height: 1.75;
}

.article-author {
  color: var(--blog-muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.badge-soft {
  background: #e9f4f2;
  color: #0f5f59;
  border: 1px solid #bddbd6;
  font-weight: 700;
}

.read-more {
  white-space: nowrap;
}

.blog-sidebar {
  position: static;
}

.side-panel {
  box-shadow: var(--blog-shadow-sm);
}

.side-panel h2 {
  color: var(--blog-text);
  font-size: 1rem;
  font-weight: 700;
}

.side-panel h2::after {
  content: none;
}

.side-panel .list-group-item {
  background: transparent;
  border-color: rgba(227, 232, 238, 0.86);
  color: #353a40;
  font-weight: 600;
}

.side-panel .list-group-item:hover {
  color: var(--blog-primary);
}

.side-panel .badge,
.badge.text-bg-light {
  background: #f3f6f8 !important;
  color: #4c545c !important;
  border-color: var(--blog-border) !important;
  font-weight: 700;
}

.ad-slot {
  margin-block: 1.25rem;
  max-width: 100%;
}

.ad-label {
  color: var(--blog-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.ad-slot .ad-item {
  align-items: center;
  overflow: hidden;
  background: #f8fafc;
  border: 1px dashed #c4ced8;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 120px;
  padding: 1rem;
}

.ad-slot-sidebar .ad-item {
  min-height: 250px;
}

.ad-slot-detail-top .ad-item,
.ad-slot-detail-inline .ad-item,
.ad-slot-detail-bottom .ad-item,
.ad-slot-home-bottom .ad-item {
  min-height: 180px;
}

.ad-slot-detail-bottom {
  display: none;
}

.article-detail {
  box-shadow: var(--blog-shadow);
}

.article-detail .article-title {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  max-width: 14em;
}

.article-shortlink {
  align-items: center;
  background: #f7fafc;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  color: var(--blog-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 0.9rem;
}

.article-shortlink-label {
  color: var(--blog-text);
  font-size: 0.86rem;
  font-weight: 700;
}

.article-shortlink a {
  color: var(--blog-primary);
  flex: 1 1 16rem;
  font-size: 0.92rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-detail .lead {
  color: #5d574e !important;
  border-left: 4px solid var(--blog-primary);
  padding-left: 1rem;
  font-size: 1.08rem;
  line-height: 1.75;
}

.article-body {
  color: #27231f;
  font-size: 1.08rem;
  line-height: 1.9;
}

.article-body > * + * {
  margin-top: 1.15rem;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--blog-text);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.24;
  margin-top: 2rem;
}

.article-body a {
  border-bottom: 1px solid rgba(15, 118, 110, 0.34);
}

.article-body img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--blog-shadow-sm);
}

.article-body pre {
  background: #17202a;
  color: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

.article-body code {
  color: #24577d;
}

.article-body pre code {
  color: inherit;
}

.article-body blockquote {
  border-left: 4px solid var(--blog-accent);
  background: #f4f7fb;
  border-radius: 0 8px 8px 0;
  padding: 0.95rem 1.15rem;
  color: #3f3830;
}

.article-signature {
  color: var(--blog-muted);
  border-top: 1px solid var(--blog-border);
  font-size: 0.95rem;
  font-weight: 650;
  margin-top: 2rem;
  padding-top: 1rem;
}

.section-title {
  color: var(--blog-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.static-page {
  background: var(--blog-card);
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  box-shadow: var(--blog-shadow);
  padding: clamp(1.35rem, 4vw, 3rem);
}

.error-page {
  max-width: 760px;
}

.static-page h1 {
  color: var(--blog-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 1rem;
}

.static-page .lead {
  color: #5d574e;
  font-size: 1.08rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.static-content {
  color: #332e28;
  line-height: 1.85;
}

.static-content h2 {
  color: var(--blog-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 1.8rem;
  margin-bottom: 0.65rem;
}

.contact-list {
  display: grid;
  grid-template-columns: minmax(80px, 120px) 1fr;
  gap: 0.8rem 1rem;
  margin-bottom: 1.5rem;
}

.contact-list dt {
  color: var(--blog-muted);
  font-weight: 800;
}

.contact-list dd {
  margin-bottom: 0;
}

.notice-box {
  background: #f4f7fb;
  border: 1px solid #cfdbe8;
  border-radius: 8px;
  color: #34495e;
  padding: 1rem;
}

.sitemap-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list a {
  font-weight: 700;
}

.related-posts .side-panel {
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.related-posts .side-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--blog-shadow);
}

.empty-state {
  background: var(--blog-surface);
  border: 1px dashed #c4ced8;
  border-radius: 8px;
  color: var(--blog-muted);
  display: grid;
  gap: 0.4rem;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state strong {
  color: var(--blog-text);
  font-size: 1.15rem;
}

.pagination .page-link {
  color: var(--blog-primary);
  border-color: var(--blog-border);
}

.pagination .active .page-link {
  background: var(--blog-primary);
  border-color: var(--blog-primary);
  color: #ffffff;
  font-weight: 800;
}

.site-footer {
  width: 100%;
  flex-shrink: 0;
  background: #eef2f5;
  color: #68717a;
  line-height: 1.9;
}

.footer-brand {
  color: #30363c;
  font-weight: 700;
}

.admin-sidebar {
  min-height: calc(100vh - 56px);
  background: #17202a;
}

.admin-topbar {
  background: #111820;
  color: #ffffff;
  min-height: 64px;
}

.admin-topbar .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

.admin-brand {
  gap: 0.75rem;
  color: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
}

.admin-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-sidebar a {
  color: #cbd5e1;
  border-radius: 6px;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: #1f2937;
  color: #ffffff;
}

.table td,
.table th {
  vertical-align: middle;
}

.form-help {
  color: var(--blog-muted);
  font-size: 0.875rem;
}

.strategy-card {
  background: #f8fafc;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  padding: 1rem;
}

.progress {
  background: #e8eef5;
  height: 0.55rem;
}

.progress-bar {
  background: var(--blog-primary);
}

.topic-grid {
  display: grid;
  gap: 0.55rem;
}

.topic-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}

.topic-item.is-done {
  background: #eef8f1;
  border-color: #bfdcc8;
}

.topic-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8eef5;
  border-radius: 999px;
  color: #44576a;
  flex: 0 0 1.8rem;
  font-size: 0.8rem;
  font-weight: 800;
  height: 1.8rem;
}

@media (max-width: 991.98px) {
  .content-shell {
    padding-top: 1.25rem;
  }

  .header-container {
    padding-inline: 1rem;
  }

  .navbar-collapse {
    align-items: stretch;
    padding-top: 0.75rem;
  }

  .site-nav {
    align-items: stretch;
    min-width: 0;
    width: 100%;
  }

  .navbar .nav-link {
    justify-content: center;
    width: 100%;
  }

  .blog-sidebar {
    position: static;
  }

  .site-search {
    margin-top: 0.75rem;
    min-width: 0;
    width: 100%;
  }

  .site-search .form-control {
    flex: 1 1 auto;
    width: auto;
  }

  .header-actions {
    justify-content: center;
    min-width: 0;
    width: 100%;
  }

  .admin-sidebar {
    min-height: auto;
  }

  .ad-slot-sidebar,
  .ad-slot-detail-inline {
    display: none;
  }

  .ad-slot-detail-bottom {
    display: block;
  }
}

@media (max-width: 575.98px) {
  .navbar {
    min-height: 66px;
  }

  .site-logo {
    height: 44px;
    max-width: 150px;
  }

  .home-hero {
    padding: 1.35rem;
  }

  .pillar-strip {
    grid-template-columns: 1fr;
  }

  .article-card-title {
    font-size: 1.35rem;
  }

  .article-title {
    font-size: 1.85rem;
  }

  .article-body {
    font-size: 1rem;
  }

  .contact-list {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .sitemap-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    gap: 0.75rem 1rem !important;
  }
}
