/* Pet Signal Guide article component system.
   Scope component rules under `.psg-article` to avoid accidental Astra/header changes.
   The single-post width bridge is intentionally limited to Astra single posts so
   WordPress' narrower content-size wrapper does not make PSG articles feel cramped.
   Deployment owner before launch: approved WordPress/Astra CSS layer.
   This file is local source for article visual QA; it does not authorize publication. */

body.single-post .site-content .ast-container {
  width: 100%;
  max-width: min(1080px, calc(100vw - 48px));
}

/* psg-article-background-card-20260720:
   Keep the reading lane as a white editorial card on a softer brand-tinted
   page background instead of a harsh white-on-blue column transition. */
body.single-post {
  background: #f4f8f6;
}

body.single-post #primary {
  width: 100%;
}

body.single-post article.ast-article-single {
  background: #ffffff;
  border: 1px solid rgba(20, 32, 29, 0.06);
  box-shadow: 0 22px 64px rgba(20, 32, 29, 0.06);
  box-sizing: border-box;
  width: min(1040px, calc(100vw - 48px));
  max-width: 1040px;
  margin-left: 50%;
  margin-right: 0;
  transform: translateX(-50%);
}

body.single-post .ast-article-single .entry-header,
body.single-post .ast-article-single .post-thumb-img-content,
body.single-post .ast-article-single .entry-content {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  transform: none;
}
/* psg-policy-worksheet-block-width-fix-20260817:
   Astra's block-layout rule uses the site's narrow 750px content token for
   every direct child of the entry content. The interactive worksheet is the
   documented wide-tool exception, so restore the article-system 960px lane
   without changing ordinary article text widths. */
body.single-post .ast-article-single .entry-content[data-ast-blocks-layout] >
.psg-article.psg-policy-worksheet {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
}

/* psg-post-navigation-title-wrap-20260821:
   Astra's desktop/tablet navigation can force the destination title onto one
   clipped line. Keep the real previous/next title readable at every approved
   viewport; the mobile two-line clamp below remains the compact variant. */
body.single-post .post-navigation .nav-previous p,
body.single-post .post-navigation .nav-next p {
  display: block !important;
  min-width: 0;
  margin: 0.35rem 0 0;
  overflow: visible !important;
  overflow-wrap: anywhere;
  white-space: normal !important;
  text-overflow: clip;
  line-height: 1.45;
}

.psg-article {
  --psg-ink: #14201d;
  --psg-muted: #5a6d67;
  --psg-border: #dfe9e3;
  --psg-surface: #ffffff;
  --psg-soft: #f3f8f4;
  --psg-accent: #177865;
  --psg-accent-dark: #115f51;
  --psg-warning: #f4b84c;
  --psg-warning-soft: #fff8e8;
  --psg-danger: #c4523d;
  --psg-danger-soft: #fff1ed;
  --psg-radius: 10px;
  --psg-shadow: 0 18px 45px rgba(20, 32, 29, 0.07);
  --psg-article-width: 960px;
  --psg-table-breakout-width: 1120px;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--psg-article-width);
  margin-inline: auto;
  transform: none;
  padding-inline: clamp(18px, 2.4vw, 28px);
  color: var(--psg-ink);
  font-size: 18px;
  line-height: 1.72;
}

.psg-article * {
  box-sizing: border-box;
}

.psg-article :focus-visible {
  outline: 3px solid rgba(23, 120, 101, 0.55);
  outline-offset: 3px;
}

.psg-article a {
  color: var(--psg-accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.psg-article a:hover {
  color: var(--psg-ink);
}

.psg-article h2,
.psg-article h3,
.psg-article h4 {
  color: var(--psg-ink);
  line-height: 1.16;
  letter-spacing: -0.015em;
}

.psg-article h2 {
  margin-block: clamp(2.25rem, 4vw, 3rem) 0.55em;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.psg-article h3 {
  margin-block: 1.8em 0.45em;
  font-size: clamp(1.28rem, 3vw, 1.65rem);
}

.psg-article p,
.psg-article ul,
.psg-article ol {
  margin-block: 0 1.15em;
}

.psg-article li + li {
  margin-top: 0.35em;
}

.psg-article-hero {
  margin: 0 0 1.8em;
  overflow: hidden;
  border: 1px solid var(--psg-border);
  border-radius: calc(var(--psg-radius) + 4px);
  background: var(--psg-surface);
  box-shadow: var(--psg-shadow);
}

.psg-article-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.psg-article-hero figcaption {
  margin: 0;
  padding: 11px 14px 13px;
  color: var(--psg-muted);
  font-size: 0.88em;
  line-height: 1.45;
  background: #fbfdfb;
}

.psg-article-header,
.psg-info-box,
.psg-quick-answer,
.psg-key-facts,
.psg-toc,
.psg-takeaway,
.psg-callout,
.psg-decision-card,
.psg-cta-box,
.psg-methodology,
.psg-sources,
.psg-update-note {
  border: 1px solid var(--psg-border);
  border-radius: var(--psg-radius);
  background: var(--psg-surface);
}

.psg-article-header {
  margin-block: 0 1.7em;
  padding: 20px;
  box-shadow: var(--psg-shadow);
}

.psg-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 12px;
  color: var(--psg-muted);
  font-size: 0.92em;
}

.psg-byline a {
  font-weight: 700;
}

/*
 * The article body owns the approved organization byline whenever Launch
 * Guard adds this class. Hide only Astra's duplicate author/date row; older
 * posts that rely on the theme byline remain unchanged.
 */
body.single-post.psg-body-byline-active .entry-header .entry-meta {
  display: none !important;
}

.psg-info-box {
  margin-block: 1.25em;
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff 0%, var(--psg-soft) 100%);
}

.psg-info-box h2,
.psg-info-box h3 {
  margin-top: 0;
}

.psg-disclosure {
  border-left: 5px solid var(--psg-warning);
  background: var(--psg-warning-soft);
}

.psg-evidence {
  border-left: 5px solid var(--psg-accent);
}

.psg-evidence-summary dl,
.psg-evidence dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.psg-evidence-summary div,
.psg-evidence div {
  min-width: 0;
}

.psg-evidence-summary dt,
.psg-evidence dt {
  color: var(--psg-muted);
  font-size: 0.82em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.psg-evidence-summary dd,
.psg-evidence dd {
  margin: 2px 0 0;
  font-weight: 650;
}

.psg-quick-answer {
  margin-block: 1.4em;
  padding: 22px;
  border-color: rgba(23, 120, 101, 0.25);
  background: #f6fbf7;
  box-shadow: var(--psg-shadow);
}

.psg-quick-answer h2 {
  margin-top: 0;
}

.psg-key-facts {
  padding: 0;
  overflow: hidden;
}

.psg-key-facts--padded {
  padding: 22px;
}

.psg-toc {
  margin-block: 1.5em;
  padding: 16px 18px;
  background: var(--psg-soft);
}

.psg-toc h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.psg-toc a {
  display: inline-block;
  min-height: 44px;
  padding-block: 6px;
}

.psg-table-scroll {
  width: 100%;
  margin-block: 1.2em;
  overflow-x: auto;
  border: 1px solid var(--psg-border);
  border-radius: var(--psg-radius);
  background: var(--psg-surface);
  box-shadow: var(--psg-shadow);
}

.psg-table-scroll-hint {
  display: none;
  margin: 0;
  color: var(--psg-muted);
  font-size: 0.88em;
  font-weight: 650;
  line-height: 1.45;
}

.psg-table-breakout {
  width: min(var(--psg-table-breakout-width), calc(100vw - 32px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.psg-article table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.95em;
}

.psg-article th,
.psg-article td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--psg-border);
  text-align: left;
  vertical-align: top;
}

.psg-article th {
  background: #eef7f0;
  color: #12342d;
  font-weight: 780;
}

.psg-research-table th {
  background: #edf5fb;
}

.psg-decision-table th {
  background: #eef7f0;
}

.psg-article tr:last-child td {
  border-bottom: 0;
}

.psg-risk-table th {
  background: var(--psg-warning-soft);
}

.psg-takeaway {
  margin-block: 0.85em 1.3em;
  padding: 14px 16px;
  border-left: 5px solid var(--psg-accent);
  background: var(--psg-soft);
  font-weight: 620;
}

.psg-callout {
  margin-block: 1.35em;
  padding: 18px 20px;
  border-left: 5px solid var(--psg-accent);
}

.psg-callout--warning {
  border-left-color: var(--psg-warning);
  background: var(--psg-warning-soft);
}

.psg-callout--risk {
  border-left-color: var(--psg-danger);
  background: var(--psg-danger-soft);
}

.psg-callout--method {
  border-left-color: var(--psg-accent);
  background: #f3faf7;
}

.psg-decision-card {
  margin-block: 1.25em;
  padding: 20px;
  box-shadow: var(--psg-shadow);
}

.psg-pros-cons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-block: 1.25em;
}

.psg-pros-cons-grid > * {
  padding: 18px;
  border: 1px solid var(--psg-border);
  border-radius: var(--psg-radius);
  background: var(--psg-surface);
}

.psg-cta-box {
  margin-block: 1.5em;
  padding: 20px;
  background: #10201c;
  color: #fff;
}

.psg-cta-box h2,
.psg-cta-box h3 {
  margin-top: 0;
  color: #fff;
}

.psg-cta-box a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  color: #10201c;
  font-weight: 780;
  text-decoration: none;
}

.psg-cta-box p {
  color: rgba(255, 255, 255, 0.86);
}

.psg-methodology,
.psg-sources,
.psg-update-note {
  margin-block: 1.6em;
  padding: 18px 20px;
}

.psg-sources {
  font-size: 0.96em;
}

.psg-sources ol {
  padding-left: 1.25em;
}

@media (max-width: 720px) {
  body.single-post .site-content .ast-container {
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  body.single-post article.ast-article-single {
    width: 100%;
    margin-inline: 0;
    transform: none;
    padding-left: 12px;
    padding-right: 12px;
    border-left: 0;
    border-right: 0;
    box-shadow: 0 12px 34px rgba(20, 32, 29, 0.045);
  }

  body.single-post .ast-article-single .entry-header,
  body.single-post .ast-article-single .post-thumb-img-content,
  body.single-post .ast-article-single .entry-content {
    width: 100%;
  }

  .psg-article {
    width: 100%;
    padding-inline: 16px;
    font-size: 17px;
  }

  .psg-article h2 {
    margin-top: 2rem;
  }

  .psg-key-facts--padded {
    padding: 17px;
  }

  .psg-toc {
    padding: 16px;
  }

  .psg-toc ol {
    padding-left: 1.2rem;
  }

  .psg-toc li {
    padding-block: 4px;
  }

  .psg-toc a {
    display: inline;
    min-height: 0;
    padding-block: 0;
    overflow-wrap: anywhere;
  }

  .psg-evidence-summary dl,
  .psg-evidence dl,
  .psg-pros-cons-grid {
    grid-template-columns: 1fr;
  }

  .psg-table-breakout {
    width: calc(100vw - 24px);
  }

  .psg-table-scroll-hint.psg-table-scroll-hint--visible {
    display: block;
    margin-top: 1.2em;
  }

  .psg-table-scroll-hint + .psg-table-scroll {
    margin-top: 0.45em;
  }

  /*
   * Astra hides the previous/next article title at its mobile breakpoint,
   * leaving only the generic direction label. Keep the destination useful
   * without allowing a long title to dominate the footer.
   */
  body.single-post .post-navigation .nav-previous p,
  body.single-post .post-navigation .nav-next p {
    display: -webkit-box !important;
    margin: 0.35rem 0 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.single-post .post-navigation .nav-links > .nav-previous:only-child,
  body.single-post .post-navigation .nav-links > .nav-next:only-child {
    width: 100%;
    flex: 0 0 100%;
  }
}

@media (min-width: 721px) and (max-width: 800px) {
  .psg-table-scroll-hint.psg-table-scroll-hint--visible {
    display: block;
    margin-top: 1.2em;
  }

  .psg-table-scroll-hint + .psg-table-scroll {
    margin-top: 0.45em;
  }
}

@media (max-width: 800px) {
  .main-header-menu-toggle,
  button.menu-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    box-sizing: border-box;
  }

  body.single-post .entry-meta,
  body.single-post .entry-meta a,
  body.single-post .entry-meta span,
  body.single-post .entry-meta time {
    font-size: 14px;
    line-height: 1.5;
  }
}

/*
 * Wide article tables can reach the viewport edge through 1152px. Astra's
 * fixed Back to top control then covers cells while the reader scrolls. Keep
 * the control on wide desktop layouts only, where it sits outside the table.
 */
@media (max-width: 1199px) {
  body.single-post #ast-scroll-top {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .psg-article *,
  .psg-article *::before,
  .psg-article *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body.single-post .site-content .ast-container,
  body.single-post #primary,
  body.single-post article.ast-article-single,
  body.single-post .ast-article-single .entry-header,
  body.single-post .ast-article-single .post-thumb-img-content,
  body.single-post .ast-article-single .entry-content {
    width: auto;
    max-width: none;
    margin-inline: 0;
    transform: none;
  }

  .psg-article {
    width: auto;
    max-width: none;
    margin-inline: 0;
    transform: none;
    color: #000;
    font-size: 12pt;
  }

  .psg-cta-box {
    border: 1px solid #999;
    background: #fff;
    color: #000;
  }

  .psg-table-scroll {
    overflow: visible;
    box-shadow: none;
  }

  .psg-article a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}
