/* Shared, static blog layout. Keep site-wide menu and information pages unchanged. */
.blog-page {
  --blog-ink: #1d3932;
  --blog-muted: #58665f;
  --blog-line: #dce4de;
  --blog-paper: #f7f8f4;
  --blog-accent: #28624d;
  background: #fff;
  color: var(--c2);
}
.blog-page :is(h1, h2, h3, h4) { text-wrap: balance; }
.blog-page :is(p, li) { text-wrap: pretty; }
.blog-page a { color: var(--blog-accent); }
.blog-page a:hover { color: var(--blog-ink); }
.blog-page :is(a, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 5px;
  border-radius: 4px;
}
.blog-page .skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 60;
  padding: .65rem 1rem;
  background: #fff;
  color: var(--blog-ink);
  transform: translateY(-160%);
}
.blog-page .skip-link:focus { transform: translateY(0); }
.blog-page .site-header { border-bottom: 1px solid #39554b; }
.blog-page .site-header .wrap { min-height: 80px; }
.blog-page .brand { color: #fff; white-space: nowrap; font-size: 1.35rem; }
.blog-nav { display: flex; align-items: center; gap: .1rem; font-family: var(--nav); }
.blog-nav a { padding: .6rem .5rem; font-size: .88rem; font-weight: 600; }
.blog-page .blog-nav a { color: #e6eee9; }
.blog-page .blog-nav a:hover { background: #2d4b41; color: #fff; border-radius: 6px; }
.blog-nav a[aria-current] { box-shadow: inset 0 -2px #b9d5c4; }
.blog-menu { display: none; }
.blog-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 44px;
  padding: .4rem .75rem;
  border: 1px solid #779087;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: .85rem;
  list-style: none;
}
.blog-menu summary::-webkit-details-marker { display: none; }
.blog-menu svg { width: 18px; height: 18px; }
.blog-shell { max-width: 1200px; margin-inline: auto; padding: 0 28px; }
.blog-article { padding: 2rem 0 0; }
.blog-page :is(.blog-meta, .breadcrumb) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.5rem;
  font-size: .78rem;
  color: var(--blog-muted);
  line-height: 1.6;
}
.blog-page :is(.blog-meta, .breadcrumb) a { font-weight: 600; }
.blog-page .article-header {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--blog-line);
}
.article-heading { min-width: 0; }
.blog-page .article-header h1 {
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  line-height: 1.18;
  color: var(--blog-ink);
  margin: 0;
  overflow-wrap: break-word;
  hyphens: manual;
}
.blog-page :is(.category-tag, .blog-card-badge) {
  display: inline-block;
  padding: .25rem .65rem;
  margin-bottom: 1rem;
  width: fit-content;
  background: #eaf0e8;
  color: var(--blog-accent);
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 600;
}
.blog-page .article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem .6rem;
  font-size: .73rem;
  line-height: 1.7;
  color: var(--blog-muted);
  margin-top: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.blog-page .featured-img {
  width: 100%;
  margin: 0;
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  background: var(--blog-paper);
  box-shadow: none;
}
.blog-page .featured-img img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 3rem;
  align-items: start;
}
.article-sidebar { grid-column: 2; grid-row: 1; position: sticky; top: 104px; min-width: 0; }
.article-toc {
  background: var(--blog-paper);
  border: 1px solid var(--blog-line);
  border-radius: 12px;
  overflow: hidden;
}
.article-toc > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  color: var(--blog-ink);
  font-family: var(--head);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.article-toc > summary::-webkit-details-marker { display: none; }
.article-toc > summary::after { content: '+'; font: 1.15rem var(--body); }
.article-toc[open] > summary::after { content: '−'; }
.article-toc nav { max-height: calc(100dvh - 220px); overflow-y: auto; padding: 0 1.2rem 1rem; }
.article-toc ol { margin: 0; padding: 0; list-style: none; }
.article-toc li + li { border-top: 1px solid var(--blog-line); }
.article-toc a {
  display: block;
  padding: .65rem 0;
  font-size: .76rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.article-toc a:hover { text-decoration: underline; text-underline-offset: 4px; }
.article-content { grid-column: 1; grid-row: 1; min-width: 0; font-size: .96rem; line-height: 1.85; }
.article-content :is(p, ul, ol) { margin: 1.1rem 0; }
.article-content > :first-child { margin-top: 0; }
.article-content :is(p, li) { overflow-wrap: break-word; }
.article-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-content :is(ul, ol) { padding-left: 1.35rem; }
.article-content li { margin: .6rem 0; padding-left: .15rem; }
.article-content li::marker { color: var(--blog-accent); font-weight: 600; }
.article-section { padding-top: 2.1rem; margin-top: 2.1rem; border-top: 1px solid var(--blog-line); }
.article-content .article-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.article-section > :last-child { margin-bottom: 0; }
.article-content h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  line-height: 1.35;
  color: var(--blog-ink);
}
.article-content h3 { margin: 1.7rem 0 .7rem; font-size: 1.12rem; line-height: 1.45; color: var(--blog-ink); }
.article-content h4 { margin: 1.3rem 0 .5rem; font-size: 1rem; }
.blog-page :is(h2, h3, h4, .article-section, .faq, #main-content) { scroll-margin-top: 108px; }
.article-content :is(blockquote, .tip-box) {
  padding: 1.35rem 1.5rem;
  margin: 1.8rem 0;
  border: 1px solid var(--blog-line);
  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;
  background: var(--blog-paper);
  color: var(--blog-ink);
  font-size: .94rem;
  line-height: 1.85;
}
.article-content > blockquote:first-child { margin-top: 0; }
.article-content blockquote p { margin: 0; }
.article-content blockquote p + p { margin-top: .8rem; }
.article-content .inline-img { margin: 1.8rem 0; box-shadow: none; }
.article-content .inline-img img { max-height: 440px; }
.article-content .table-wrap { margin: 1.5rem 0; box-shadow: none; border-color: var(--blog-line); }
.article-content table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: .83rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.article-content :is(th, td) { padding: .9rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--blog-line); }
.article-content th { background: var(--blog-ink); color: #fff; font-weight: 600; }
.article-content tbody tr:nth-child(even) { background: var(--blog-paper); }
.article-content tbody tr:last-child td { border-bottom: 0; }
.article-content .faq { max-width: none; margin: 0; }
.article-content .faq details { border-color: var(--blog-line); border-radius: 10px; box-shadow: none; transition: none; }
.article-content .faq details[open] { border-color: var(--green); }
.article-content .faq summary { padding: 1.1rem 1.2rem; background: var(--blog-paper); font-size: .94rem; line-height: 1.6; transition: none; }
.article-content .faq p { padding: .9rem 1.2rem 1.2rem; margin: 0; font-size: .94rem; line-height: 1.85; }
.article-content .faq h3 { font-size: inherit; margin: 0; line-height: inherit; text-wrap: pretty; }
.article-content hr { border: 0; border-top: 1px solid var(--blog-line); margin: 2rem 0; }
.article-content .cta { text-decoration: none; }
.blog-page .site-footer { margin-top: 4rem; }
.blog-page .site-footer a { color: #fff; }
.blog-page .site-footer .f-note { color: #d7e4dc; }
.blog-page.blog-index .hero { max-width: 850px; padding: 3rem 0 2.3rem; }
.blog-page.blog-index .hero h1 { color: var(--blog-ink); font-size: clamp(2rem, 4vw, 3rem); }
.blog-page.blog-index .lead { color: var(--blog-muted); }
.blog-page.blog-index .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.blog-page .blog-card { box-shadow: none; border-color: var(--blog-line); transition: none; }
.blog-page .blog-card:hover { transform: none; box-shadow: none; border-color: var(--green); }
.blog-page .blog-thumb { aspect-ratio: 16 / 10; }
.blog-page .blog-card:hover .blog-thumb img { transform: none; }
.blog-page .blog-card-body { padding: 1.25rem; }
.blog-page .blog-card h2 { font-size: 1.08rem; line-height: 1.45; margin-bottom: .75rem; }
.blog-page .blog-card h2 a { color: var(--blog-ink); }
.blog-page .blog-card h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.blog-page .blog-card p { color: var(--blog-muted); font-size: .86rem; }
.blog-card-meta { display: flex; flex-wrap: wrap; gap: .35rem; padding-top: .8rem; border-top: 1px solid var(--blog-line); font-size: .72rem; color: var(--blog-muted); }
@media (max-width: 1199px) {
  .blog-page .site-header .wrap > .blog-nav { display: none; }
  .blog-menu { display: block; }
  .blog-menu .blog-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: .25rem;
    padding: .8rem 24px 1.2rem;
    background: var(--dark);
    border-top: 1px solid #39554b;
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
  }
  .blog-menu .blog-nav a { min-height: 44px; padding: .65rem .5rem; font-size: .95rem; }
  .blog-menu .blog-nav a[aria-current] { background: #2d4b41; box-shadow: none; border-radius: 6px; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 2rem; }
}
@media (max-width: 900px) {
  .blog-page .article-header { gap: 1.5rem; }
  .blog-page .article-header h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
  .article-layout { display: flex; flex-direction: column; gap: 2rem; }
  .article-sidebar { position: static; width: 100%; }
  .article-content { width: 100%; }
  .article-toc nav { max-height: 320px; }
  .article-toc a { font-size: .85rem; }
  .blog-page.blog-index .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .blog-page .site-header .wrap { min-height: 72px; padding-inline: 18px; gap: .5rem; }
  .blog-page .brand { font-size: 1.1rem; }
  .blog-menu summary { padding: .4rem .55rem; }
  .blog-shell { padding-inline: 20px; }
  .blog-article { padding-top: 1.3rem; }
  .blog-page :is(.blog-meta, .breadcrumb) { font-size: .72rem; margin-bottom: 1.25rem; }
  .blog-page .article-header { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
  .blog-page .article-header h1 { font-size: clamp(1.65rem, 6.5vw, 2rem); line-height: 1.22; }
  .blog-page .featured-img { aspect-ratio: 16 / 10; border-radius: 10px; }
  .blog-page .article-meta { margin-top: 1rem; }
  .article-content { font-size: .94rem; line-height: 1.8; }
  .article-section { padding-top: 1.7rem; margin-top: 1.7rem; }
  .article-content :is(blockquote, .tip-box) { padding: 1rem 1.15rem; }
  .article-content .faq summary { padding: 1rem; }
  .article-content .faq p { padding: .8rem 1rem 1rem; }
  .blog-page.blog-index .blog-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-page.blog-index .hero { padding: 2rem 0 1.5rem; }
  .blog-page .site-footer { margin-top: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blog-page *, .blog-page *::before, .blog-page *::after { transition: none !important; animation: none !important; }
}
@media print {
  .blog-page .site-header, .blog-page .site-footer, .article-sidebar, .skip-link { display: none; }
  .blog-shell { max-width: none; padding: 0; }
  .article-layout { display: block; }
  .blog-page .article-header { display: block; }
  .blog-page .featured-img { max-width: 60%; margin-top: 1rem; }
  .article-content .table-wrap { overflow: visible; }
  .article-content table { min-width: 0; }
}
