/**
 * Guide layout shared by the mats article and the ionizers article.
 * Scoped to body.elimstat-article-guide so the rest of the store is unchanged.
 */

body.elimstat-article-guide {
  --mats-ink: #1b2430;
  --mats-navy: #0e2c57;
  --mats-blue: #184187;
  --mats-blue-soft: #e7f2fb;
  --mats-line: #d5e0ee;
  --mats-paper: #f5f8fb;
  --mats-column: 42rem;
}

body.elimstat-article-guide .mats-guide-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100000;
  height: 3px;
  width: 0;
  background: var(--mats-blue);
  pointer-events: none;
}

body.elimstat-article-guide .entry-header,
body.elimstat-article-guide .mats-guide-layout {
  display: grid;
  grid-template-columns: minmax(9.5rem, 13.5rem) minmax(0, 1fr);
  column-gap: 2.5rem;
  align-items: start;
  max-width: 68rem;
  margin-left: auto;
  margin-right: auto;
}

body.elimstat-article-guide .entry-title {
  grid-column: 2;
  max-width: var(--mats-column);
  margin: 0 0 0.25rem;
  color: var(--mats-navy);
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

body.elimstat-article-guide .entry-content {
  color: var(--mats-ink);
}

body.elimstat-article-guide .mats-guide-rail {
  position: relative;
  align-self: stretch;
  grid-column: 1;
  grid-row: 1;
}

body.elimstat-article-guide .mats-guide-rail__float {
  width: 100%;
}

body.elimstat-article-guide .mats-guide-rail__float.is-fixed {
  position: fixed;
  z-index: 30;
}

body.elimstat-article-guide .mats-guide-rail__float.is-docked {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

body.elimstat-article-guide .mats-guide-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  max-width: var(--mats-column);
}

body.elimstat-article-guide .mats-guide-rail__label {
  margin: 0 0 0.55rem;
  color: var(--mats-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.elimstat-article-guide .mats-guide-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.elimstat-article-guide .mats-guide-toc a {
  display: block;
  margin: 0 0 0.15rem;
  padding: 0.35rem 0.7rem;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: #3d4d66;
  font-size: 0.92rem;
  line-height: 1.3;
  text-decoration: none;
}

body.elimstat-article-guide .mats-guide-toc a:hover,
body.elimstat-article-guide .mats-guide-toc a.is-active {
  background: var(--mats-blue-soft);
  border-left-color: var(--mats-blue);
  color: var(--mats-navy);
}

body.elimstat-article-guide .mats-guide-profile {
  margin: 0.35rem 0 1.15rem;
}

body.elimstat-article-guide .mats-guide-profile > div {
  width: 100%;
}

body.elimstat-article-guide .mats-guide-meta,
body.elimstat-article-guide .mats-guide-kicker {
  margin: 0 0 0.4rem;
  color: var(--mats-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.elimstat-article-guide .mats-guide-answer,
body.elimstat-article-guide .mats-guide-scale,
body.elimstat-article-guide .mats-guide-steps,
body.elimstat-article-guide .mats-guide-methods,
body.elimstat-article-guide .mats-guide-tools,
body.elimstat-article-guide .mats-guide-faq {
  margin: 1.25rem 0 0;
}

body.elimstat-article-guide .mats-guide-answer {
  padding: 1.1rem 1.2rem 1.15rem;
  background:
    linear-gradient(180deg, #f3f8fd 0%, #fff 70%);
  border: 1px solid var(--mats-line);
  border-radius: 16px;
}

body.elimstat-article-guide .mats-guide-answer p:last-child {
  margin: 0;
  color: var(--mats-ink);
  font-size: 1.125rem !important;
  line-height: 1.55;
}

body.elimstat-article-guide .mats-guide-main h2 {
  margin: 0 0 0.8rem;
  color: var(--mats-navy);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  scroll-margin-top: 1.25rem;
}

body.elimstat-article-guide .mats-guide-scale ol,
body.elimstat-article-guide .mats-guide-methods ol,
body.elimstat-article-guide .mats-guide-tools ul {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.elimstat-article-guide .mats-guide-scale ol,
body.elimstat-article-guide .mats-guide-methods ol {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.elimstat-article-guide .mats-guide-scale__stop,
body.elimstat-article-guide .mats-guide-methods li {
  margin: 0;
  padding: 0.9rem 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--mats-line);
  border-top: 4px solid var(--mats-blue);
  border-radius: 14px;
}

body.elimstat-article-guide .mats-guide-scale__stop.is-conductive { border-top-color: #0e2c57; }
body.elimstat-article-guide .mats-guide-scale__stop.is-dissipative { border-top-color: #184187; }
body.elimstat-article-guide .mats-guide-scale__stop.is-insulative { border-top-color: #8aa0bd; }
body.elimstat-article-guide .mats-guide-scale__stop.is-bench { border-top-color: #0e2c57; }
body.elimstat-article-guide .mats-guide-scale__stop.is-line { border-top-color: #184187; }
body.elimstat-article-guide .mats-guide-scale__stop.is-gun { border-top-color: #8aa0bd; }

body.elimstat-article-guide .mats-guide-scale__range,
body.elimstat-article-guide .mats-guide-tools span {
  display: block;
  color: var(--mats-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.elimstat-article-guide .mats-guide-scale__name,
body.elimstat-article-guide .mats-guide-steps h3,
body.elimstat-article-guide .mats-guide-methods h3 {
  display: block;
  margin: 0.2rem 0 0.35rem;
  color: var(--mats-navy);
  font-size: 1rem;
  line-height: 1.3;
}

body.elimstat-article-guide .mats-guide-scale__note,
body.elimstat-article-guide .mats-guide-methods li p,
body.elimstat-article-guide .mats-guide-methods__note {
  margin: 0;
  color: #3d4d66;
  font-size: 0.95rem !important;
  line-height: 1.45;
}

body.elimstat-article-guide .mats-guide-methods__note {
  margin-top: 0.75rem;
}

body.elimstat-article-guide .mats-guide-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: mats-step;
}

body.elimstat-article-guide .mats-guide-steps li {
  position: relative;
  margin: 0 0 0.75rem;
  padding: 0.85rem 0.95rem 0.9rem 3.1rem;
  background: var(--mats-paper);
  border-radius: 14px;
  scroll-margin-top: 1.25rem;
}

body.elimstat-article-guide .mats-guide-steps li::before {
  counter-increment: mats-step;
  content: counter(mats-step);
  position: absolute;
  top: 0.9rem;
  left: 0.8rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--mats-blue);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.6rem;
  text-align: center;
}

body.elimstat-article-guide .mats-guide-steps li p {
  margin: 0;
  font-size: 1rem !important;
  line-height: 1.5;
}

body.elimstat-article-guide .mats-guide-tools ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.elimstat-article-guide .mats-guide-tools a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  height: 100%;
  padding: 0.8rem 0.9rem;
  background: #fff;
  border: 1px solid var(--mats-line);
  border-radius: 12px;
  color: var(--mats-navy);
  text-decoration: none;
}

body.elimstat-article-guide .mats-guide-tools a:hover {
  border-color: var(--mats-blue);
  background: var(--mats-blue-soft);
}

body.elimstat-article-guide .mats-guide-tools strong {
  font-size: 0.98rem;
  font-weight: 600;
}

body.elimstat-article-guide .mats-guide-body {
  margin-top: 2.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--mats-line);
}

body.elimstat-article-guide .mats-guide-body > nav {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.elimstat-article-guide .mats-guide-body h2 {
  margin: 2.4rem 0 0.75rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--mats-line);
  color: var(--mats-navy);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  scroll-margin-top: 1.25rem;
}

body.elimstat-article-guide .mats-guide-body p,
body.elimstat-article-guide .mats-guide-body li {
  color: var(--mats-ink);
  font-size: 1.0625rem !important;
  line-height: 1.7 !important;
}

body.elimstat-article-guide .mats-guide-body a {
  color: var(--mats-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

body.elimstat-article-guide .mats-guide-body img.wp-post-image,
body.elimstat-article-guide .mats-guide-body .wp-block-image,
body.elimstat-article-guide .mats-guide-body figure {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 1rem 0 1.25rem !important;
}

body.elimstat-article-guide .mats-guide-body img {
  display: block;
  width: 100%;
  height: auto !important;
  max-height: 28rem;
  object-fit: contain;
  border: 1px solid var(--mats-line);
  border-radius: 14px;
  background: var(--mats-paper);
}

body.elimstat-article-guide .mats-guide-body figcaption {
  margin-top: 0.45rem;
  color: #3d4d66;
  font-size: 0.92rem;
}

body.elimstat-article-guide .mats-guide-body .wp-block-columns {
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

body.elimstat-article-guide .mats-guide-body .wp-block-column figure,
body.elimstat-article-guide .mats-guide-body .wp-block-column img {
  margin: 0 !important;
}

body.elimstat-article-guide .mats-guide-body .wp-block-quote {
  margin: 1.25rem 0;
  padding: 0.9rem 1rem 0.95rem 1.1rem;
  background: var(--mats-paper);
  border: 0;
  border-left: 4px solid var(--mats-blue) !important;
  border-radius: 0 14px 14px 0;
}

body.elimstat-article-guide .mats-guide-body .wp-block-quote p {
  font-size: 1.05rem !important;
  font-style: normal !important;
  line-height: 1.55 !important;
}

body.elimstat-article-guide .mats-guide-body .wp-block-quote cite {
  display: block;
  margin-top: 0.45rem;
  color: var(--mats-blue);
  font-size: 0.9rem !important;
  font-style: normal;
  text-align: left;
}

body.elimstat-article-guide .mats-guide-body > div[style*="inline-flex"] {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0.25rem 0 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--mats-line);
}

body.elimstat-article-guide .mats-guide-faq details {
  border-bottom: 1px solid var(--mats-line);
}

body.elimstat-article-guide .mats-guide-faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  color: var(--mats-navy);
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

body.elimstat-article-guide .mats-guide-faq summary::-webkit-details-marker {
  display: none;
}

body.elimstat-article-guide .mats-guide-faq summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--mats-blue);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1;
}

body.elimstat-article-guide .mats-guide-faq details[open] summary::after {
  content: "–";
}

body.elimstat-article-guide .mats-guide-faq details p {
  margin: 0 0 0.95rem;
  color: var(--mats-ink);
  font-size: 1.02rem;
  line-height: 1.6;
}

body.elimstat-article-guide .mats-guide-toc a:focus-visible,
body.elimstat-article-guide .mats-guide-tools a:focus-visible,
body.elimstat-article-guide .mats-guide-faq summary:focus-visible {
  outline: 2px solid var(--mats-blue);
  outline-offset: 2px;
}

body.elimstat-article-guide .elimstat-content-standards-note {
  margin-top: 1.75rem;
}

@media (max-width: 860px) {
  body.elimstat-article-guide .entry-header,
  body.elimstat-article-guide .mats-guide-layout {
    display: block;
    max-width: none;
  }

  body.elimstat-article-guide .entry-title,
  body.elimstat-article-guide .mats-guide-main {
    max-width: none;
  }

  body.elimstat-article-guide .mats-guide-rail {
    align-self: auto;
    margin: 0 0 1rem;
  }

  body.elimstat-article-guide .mats-guide-rail__float {
    padding: 0.55rem 0 0.65rem;
    background: rgba(255, 255, 255, 0.94);
  }

  body.elimstat-article-guide .mats-guide-rail__float.is-fixed {
    background: #fff;
    border-bottom: 1px solid var(--mats-line);
  }

  body.elimstat-article-guide .mats-guide-rail__label {
    display: none;
  }

  body.elimstat-article-guide .mats-guide-toc ol {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }

  body.elimstat-article-guide .mats-guide-toc a {
    flex: 0 0 auto;
    border: 1px solid var(--mats-line);
    border-left-width: 1px;
    border-radius: 999px;
    background: #fff;
  }

  body.elimstat-article-guide .mats-guide-toc a.is-active {
    border-color: var(--mats-blue);
  }

  body.elimstat-article-guide .mats-guide-scale ol,
  body.elimstat-article-guide .mats-guide-methods ol,
  body.elimstat-article-guide .mats-guide-tools ul,
  body.elimstat-article-guide .mats-guide-body .wp-block-columns {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  body.elimstat-article-guide .mats-guide-body h2,
  body.elimstat-article-guide .mats-guide-steps li {
    scroll-margin-top: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  body.elimstat-article-guide .mats-guide-progress,
  body.elimstat-article-guide .mats-guide-rail {
    display: none;
  }
}
