:root {
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f5faf9;
  --card-bg: #ffffff;
  --text: #152129;
  --muted: #64747d;
  --soft: #eef6f5;
  --border: #dce9e7;
  --primary: #0f6f78;
  --primary-dark: #073642;
  --accent: #f2b84b;
  --danger: #e85d4f;
  --shadow: 0 16px 40px rgba(7, 54, 66, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body:not(.is-home) {
  padding-top: 58px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: #0b5961;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: var(--reading-progress, 0%);
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--danger));
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--danger);
  font-size: 0.95rem;
  font-weight: 800;
}

.logo:hover {
  color: var(--danger);
}

.logo-icon {
  font-size: 1.05rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 11px;
  border-radius: 8px;
  color: #40515a;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: var(--soft);
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: 800 1.2rem var(--font-body);
  cursor: pointer;
}

.breadcrumbs {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.breadcrumbs .container {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.breadcrumb-sep {
  color: #a2afb4;
}

.breadcrumb-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-main {
  min-height: 60vh;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  padding: 32px 0 24px;
}

.article-home-card {
  display: flex;
  flex-direction: column;
  min-height: 192px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 8px 22px rgba(7, 54, 66, 0.045);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.article-home-card:hover {
  border-color: #9fcfcd;
  box-shadow: 0 14px 30px rgba(7, 54, 66, 0.09);
  color: var(--text);
  transform: translateY(-3px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 0;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #edf7f6, #fff7e3);
  font-size: 1.25rem;
}

.card-read-time {
  color: #8a9ba2;
  font-size: 0.78rem;
  font-weight: 700;
}

.article-home-title {
  padding: 13px 18px 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.36;
}

.article-home-desc {
  flex: 1;
  padding: 8px 18px 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding: 12px 18px 14px;
  border-top: 1px solid #edf3f2;
}

.card-read-more {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 0 52px;
}

.pag-link {
  min-width: 42px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 0 13px;
  font-size: 0.9rem;
  font-weight: 700;
}

.pag-link:hover,
.pag-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff !important;
}

.pag-dots {
  color: #8fa0a6;
  padding: 0 4px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 34px;
  align-items: start;
  padding: 34px 0 56px;
}

.article-main {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: clamp(24px, 4vw, 46px);
  box-shadow: 0 14px 36px rgba(7, 54, 66, 0.06);
}

.article-main h1 {
  margin: 0 0 20px;
  color: #0e1d24;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.article-body {
  color: #26343b;
  font-size: 1.05rem;
  line-height: 1.78;
}

.article-body h2 {
  margin: 42px 0 16px;
  color: #102027;
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: 0;
}

.article-body h3 {
  margin: 28px 0 12px;
  color: #16313a;
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 800;
}

.article-body p {
  margin: 0 0 18px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 22px;
  padding-left: 1.35rem;
}

.article-body li {
  margin: 8px 0;
}

.article-body blockquote {
  margin: 26px 0;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: #fff7e3;
  padding: 18px 20px;
  color: #4b3a15;
}

.article-body table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--border);
  font-size: 0.94rem;
}

.article-body th,
.article-body td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  vertical-align: top;
}

.article-body th {
  background: var(--primary-dark);
  color: #fff;
  text-align: left;
  font-weight: 800;
}

.article-body tr:last-child td {
  border-bottom: 0;
}

.article-body code {
  border-radius: 6px;
  background: #eef4f3;
  padding: 0.15em 0.35em;
  color: #0b5961;
  font-size: 0.92em;
}

.article-body mark {
  border-radius: 4px;
  background: #fff0bd;
  padding: 0.08em 0.2em;
}

.mobile-toc {
  display: none;
  margin: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px 14px;
}

.mobile-toc summary {
  cursor: pointer;
  font-weight: 800;
}

.mobile-toc ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.article-sidebar {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 16px;
}

.sidebar-search,
.sidebar-toc,
.sidebar-related {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(7, 54, 66, 0.055);
}

.sidebar-search-box,
.search-hero,
.lm-search-panel {
  position: relative;
}

.sidebar-search input,
.search-hero input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  font: 700 0.94rem var(--font-body);
  outline: none;
}

.sidebar-search input:focus,
.search-hero input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 111, 120, 0.12);
}

.search-dropdown,
.hero-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(7, 54, 66, 0.16);
}

.sd-item {
  display: flex;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid #edf3f2;
  color: var(--text);
}

.sd-item:hover {
  background: var(--soft);
}

.sd-icon {
  flex: 0 0 auto;
}

.sd-title {
  overflow: hidden;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-slug {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-empty {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.sidebar-toc h3,
.sidebar-related h3 {
  margin: 0 0 12px;
  color: #102027;
  font-size: 1rem;
}

.sidebar-toc ul,
.sidebar-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-toc li + li,
.sidebar-related li + li {
  margin-top: 9px;
}

.sidebar-toc a {
  display: block;
  border-left: 2px solid #d8e6e4;
  padding: 3px 0 3px 10px;
  color: #52666e;
  font-size: 0.86rem;
  line-height: 1.4;
}

.sidebar-toc a:hover,
.sidebar-toc a.active {
  border-left-color: var(--primary);
  color: var(--primary);
}

.related-card {
  display: block;
  border-radius: 7px;
  background: #f7fbfa;
  padding: 10px 11px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.related-card:hover {
  background: var(--soft);
  color: var(--primary);
}

.related-bottom {
  padding: 0 0 54px;
}

.related-bottom-heading {
  margin: 0 0 18px;
  color: #102027;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
}

.related-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.related-bottom-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  color: var(--text);
}

.related-bottom-card:hover {
  border-color: #9fcfcd;
  color: var(--primary);
}

.related-bottom-title {
  font-weight: 800;
  line-height: 1.35;
}

.related-bottom-desc {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.attention-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 24px 0;
  border: 1px solid #bee3df;
  border-radius: 8px;
  background: #eaf8f6;
  padding: 16px 18px;
}

.attention-box p {
  margin: 0;
}

.attention-icon {
  flex: 0 0 auto;
}

.poll-widget {
  margin: 26px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(7, 54, 66, 0.06);
}

.poll-widget-question {
  margin-bottom: 12px;
  color: #102027;
  font-weight: 800;
}

.poll-widget-option {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f8fbfb;
  padding: 0 12px;
  cursor: pointer;
}

.poll-widget-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: rgba(15, 111, 120, 0.16);
  transition: width 0.4s ease;
}

.poll-widget-label,
.poll-widget-pct {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  font-weight: 700;
}

.poll-widget-option.selected {
  border-color: var(--primary);
}

.faq-item,
.article-body details {
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 0;
}

.faq-item summary,
.article-body details summary {
  cursor: pointer;
  padding: 14px 16px;
  color: #102027;
  font-weight: 800;
}

.faq-answer,
.article-body details > p {
  padding: 0 16px 16px;
}

.site-footer-premium {
  margin-top: 60px;
  padding: 40px 0 0;
  background: #151918;
  color: #aab5b3;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #2a302f;
}

.footer-brand {
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}

.footer-about,
.footer-updated {
  color: #aab5b3;
  font-size: 0.86rem;
  line-height: 1.6;
}

.footer-col h4 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 0.92rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: #aab5b3;
  font-size: 0.86rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding: 20px 0;
  color: #87928f;
  text-align: center;
  font-size: 0.82rem;
}

.cookie-popup {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  transform: translateY(100%);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  padding: 13px 18px;
  transition: transform 0.35s ease;
  box-shadow: 0 -12px 30px rgba(7, 54, 66, 0.1);
}

.cookie-popup.visible {
  transform: translateY(0);
}

.cookie-inner {
  width: min(1140px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.86rem;
}

.cookie-btn {
  min-width: 96px;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: var(--danger);
  color: #fff;
  font: 800 0.82rem var(--font-body);
  cursor: pointer;
}

.cookie-btn:hover {
  background: #ca493f;
}

@media (max-width: 980px) {
  .main-nav {
    gap: 2px;
  }

  .main-nav > .nav-link:nth-child(n + 4) {
    display: none;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    display: none;
  }

  .mobile-toc {
    display: block;
  }

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

@media (max-width: 720px) {
  body:not(.is-home) {
    padding-top: 56px;
  }

  .container {
    width: min(100% - 28px, 1140px);
  }

  .mobile-menu-btn {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(100% + 8px);
    display: none;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open,
  .main-nav.open {
    display: grid;
  }

  .main-nav > .nav-link:nth-child(n) {
    display: flex;
  }

  .nav-link {
    justify-content: flex-start;
    width: 100%;
  }

  .nav-dropdown {
    width: 100%;
  }

  .breadcrumbs .container {
    min-height: 44px;
  }

  .cat-grid,
  .related-bottom-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .article-main {
    padding: 22px 18px;
  }

  .article-body {
    font-size: 1rem;
  }

  .article-body table {
    display: block;
    overflow-x: auto;
  }

  .cookie-inner {
    align-items: stretch;
    flex-direction: column;
  }
}
