/* v0.1.3: real WP root is often a SIBLING of the hero grid in display:contents. */
#thinf-root { clear: both; width: 100%; max-width: 1180px; margin: 38px auto 0; font-family: inherit; min-width: 0; box-sizing: border-box !important; }
/* The existing detail uses display:contents and a two-column desktop hero grid. */
body.single-post .entry-content.single-content > #thinf-root.thinf-wide-layout,
body.single-post .entry-content-wrap > #thinf-root.thinf-wide-layout {
  grid-column: 1 / -1 !important; grid-row: auto !important;
  justify-self: center !important; align-self: start !important;
  width: min(100%, 1180px) !important; max-width: 1180px !important;
  min-width: 0 !important; margin: 32px auto 48px !important;
  padding: 0 16px !important; display: block !important;
}
/* Full-span must NOT depend on JS relocating an already-outside-grid node. */
body.single-post .entry-content-wrap #thinf-root,
body.single-post .entry-content-wrap .entry-content.single-content > #thinf-root,
body.single-post.th-detail-php-layout-active .entry-content.single-content > #thinf-root {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
  justify-self: center !important;
  align-self: start !important;
  width: min(100%, 1180px) !important;
  max-width: 1180px !important;
  margin: 32px auto 48px !important;
  min-width: 0 !important;
  padding: 0 16px !important;
  display: block !important;
}
body.single-post .entry-content-wrap #thinf-root .thinf-container,
body.single-post .entry-content-wrap #thinf-root .thinf-article {
  width:100% !important; min-width:0 !important; max-width:none !important;
}
/* Loaded markup is the actual target article HTML. Let installed TH detail
   styles control the title, spot, feature image, meta, body and sidebar. */
body.single-post.th-detail-php-layout-active #thinf-root .thinf-article.thinf-live-entry {
  width:100% !important; max-width:1180px !important; margin:32px auto !important;
  padding:28px 0 0 !important; border-top:2px solid #dbe5f1;
  min-width:0 !important; scroll-margin-top:90px;
}
body.single-post #thinf-root .thinf-article.thinf-live-entry > .entry-content-wrap {
  width:100% !important; max-width:none !important;
}
#thinf-root .thinf-original { max-width:780px; margin:15px auto 30px; padding:14px 10px 0; border-top:1px solid #dbe5f1; font-size:.9rem; }
#thinf-root .thinf-load-button { display: inline-block; margin-top: 12px; padding: 10px 16px;
  border: 1px solid #176ea6; border-radius: 8px; background:#fff; color:#075280;
  font:inherit; font-size:.9rem; font-weight:700; cursor:pointer; }
#thinf-root .thinf-load-button:hover, #thinf-root .thinf-load-button:focus-visible { background:#eaf4fc; }
#thinf-root .thinf-load-button[hidden] { display:none; }
#thinf-root a:focus-visible { outline: 3px solid #226fb3; outline-offset: 3px; }
@media (max-width: 767px) {
  #thinf-root { padding: 0 14px; margin-top: 28px; }
  #thinf-root .thinf-card { padding: 18px 15px; border-radius: 10px; }
  #thinf-root .thinf-article { padding-top: 27px; margin-top: 28px; }
}

/* Printing captures only the canonical first article. The second article is available on its own URL. */
@media print { #thinf-root { display:none !important; } }

/* v0.1.4: direct continuation; JS-enhanced card is a minimal prefetch anchor.
   No second visual headline/card, unless the network genuinely fails. */
#thinf-root.thinf-auto { margin-top: 0 !important; margin-bottom: 12px !important; }
#thinf-root.thinf-auto .thinf-card:not(.thinf-fallback) {
  box-sizing: border-box !important; display: block !important; height: 1px !important;
  min-height: 1px !important; max-height: 1px !important; width: 100% !important;
  overflow: hidden !important; padding: 0 !important; border: 0 !important;
  margin: 0 !important; opacity: 0 !important; pointer-events: none !important;
}
#thinf-root.thinf-auto .thinf-card:not(.thinf-fallback) > * { display: none !important; }
#thinf-root.thinf-auto .thinf-card.thinf-fallback {
  opacity: 1 !important; pointer-events: auto !important; display: block !important;
  width: min(100%, 680px) !important; margin: 12px auto !important;
  padding: 12px 16px !important; border: 1px solid #dbe5f1 !important;
  border-radius: 10px !important; height: auto !important; overflow: visible !important;
}
#thinf-root.thinf-auto .thinf-card.thinf-fallback > * { display: block !important; }
#thinf-root .thinf-wait-status[hidden] { display: none !important; }
#thinf-root .thinf-wait-status:not([hidden]) {
  display:block !important; margin: 10px auto !important; padding: 9px 16px !important;
  max-width: 680px !important; color:#475569 !important; font-size: 13px !important;
}
body.single-post.th-detail-php-layout-active #thinf-root.thinf-auto .thinf-article.thinf-live-entry {
  margin: 9px auto 14px !important; padding-top: 13px !important;
  border-top: 1px solid #dbe5f1 !important; scroll-margin-top: 90px;
}
/* Footer scripts on the canonical page are intentionally not rerun in a fetched
   fragment. Reproduce only the normal *closed* copyright disclosure. */
body.single-post #thinf-root .thinf-live-entry details.th-end-reuse-card-v1013:not([open]) > :not(summary),
body.single-post #thinf-root .thinf-live-entry details.thinf-reuse:not([open]) > :not(summary) {
  display: none !important;
}
body.single-post #thinf-root .thinf-live-entry details.thinf-reuse {
  display:block !important; width:100% !important; padding:13px 0 !important;
  border-top:1px solid #e2e8f0 !important; margin: 10px 0 !important;
}
body.single-post #thinf-root .thinf-live-entry details.thinf-reuse > summary {
  display:list-item !important; font-size:12.5px !important; font-weight:700 !important;
  color:#475569 !important; cursor:pointer !important;
}
body.single-post #thinf-root .thinf-live-entry details.thinf-reuse .thsh-reuse-notice {
  width:100% !important; max-width:100% !important; margin:10px 0 0 !important;
}
