/* TV 2026-11-16 — layout integrity after screenshot audit.
   Only alignment, readability, and a non-obstructing way to use the configurator.
   Keeps brand, semantic content and dynamic code untouched. */
:root{--tv-integrity-max:1160px}
body.tv-final-release main{max-width:100%;min-width:0}
body.tv-final-release main > section,
body.tv-final-release main > div{box-sizing:border-box;max-width:100%;min-width:0}
body.tv-final-release main > section > .container,
body.tv-final-release main > div.container,
body.tv-final-release main > .container,
body.tv-final-release main > section .tv-content-container{
  box-sizing:border-box;width:min(var(--tv-integrity-max),calc(100% - 48px));max-width:var(--tv-integrity-max);
  margin-inline:auto;
}
/* Generic reference paragraphs inserted by article templates must never touch viewport edge. */
body.tv-final-release main .tv-integrity-note,
body.tv-final-release main > p.tv-method-link,
body.tv-final-release main > p.tv-journal-context,
body.tv-final-release main > p.tcase-note{
  box-sizing:border-box;width:min(var(--tv-integrity-max),calc(100% - 48px));max-width:var(--tv-integrity-max);
  margin:15px auto 25px;padding:14px 18px;
  border:1px solid #eadcc7;border-radius:12px;background:#fffaf3;
  color:#6e5a42;font-size:14px;line-height:1.65;
}
body.tv-final-release main .tv-integrity-note p{margin:0;line-height:1.6}
body.tv-final-release main .tv-integrity-note a,
body.tv-final-release main .tv-doc-inline-links a,
body.tv-final-release main .tv-resource-links-wrap a{overflow-wrap:anywhere;text-underline-offset:3px}
/* Do not overlap the bottom of every page: the header has a permanent calculator link. */
body.tv-final-release .tv-tariff-dock{display:none!important}
/* Contain document previews and prevent visually cropped images/tables. */
body.tv-final-release main .tv-documents-semantic .tv-semantic-file-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:22px!important;
  max-width:100%;overflow:visible!important;scroll-snap-type:none!important;
}
body.tv-final-release main .tv-documents-semantic .tv-semantic-file-card{
  display:flex;flex-direction:column;min-width:0;max-width:100%;overflow:hidden;
  border-radius:16px;background:#fff;box-sizing:border-box;
}
body.tv-final-release main .tv-documents-semantic .tv-semantic-file-preview{
  flex:1;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}
body.tv-final-release main .tv-documents-semantic .tv-semantic-file-preview table{
  width:100%;min-width:430px;table-layout:fixed;border-collapse:collapse;
}
body.tv-final-release main .tv-documents-semantic .tv-semantic-file-preview :is(td,th){
  overflow-wrap:anywhere;white-space:normal;vertical-align:top;
}
body.tv-final-release main .tv-documents-semantic .tv-semantic-file-footer{margin-top:auto}
/* Project tools use the SAME page container as the rest of the lab. */
body.tv-final-release main > .tv-lab-project-section{box-sizing:border-box;width:100%;max-width:100%;
  margin-inline:0!important;padding-block:clamp(45px,5vw,68px);border-radius:0!important}
body.tv-final-release main > .tv-lab-project-section > .container{
  width:min(var(--tv-integrity-max),calc(100% - 48px))!important;
  max-width:var(--tv-integrity-max)!important;margin-inline:auto!important;padding:0!important;
}
body.tv-final-release .tv-lab-project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
body.tv-final-release .tv-lab-project-grid > *{min-width:0;max-width:100%;box-sizing:border-box}
/* Related material should read as a purposeful block, not a link pasted at x=0. */
body.tv-final-release main > .tv-geo-method-links,
body.tv-final-release main > .tv-related-articles{
  margin-inline:0!important;padding-block:clamp(44px,5vw,65px)!important;
}
body.tv-final-release main > .tv-geo-method-links > .container,
body.tv-final-release main > .tv-related-articles > .container{
  box-sizing:border-box;width:min(var(--tv-integrity-max),calc(100% - 48px));
  max-width:var(--tv-integrity-max);margin-inline:auto!important;
}
/* Section dividers: avoid adjacent oversized gaps while keeping individual page design. */
body.tv-final-release main > .tv-public-docs{padding-top:clamp(40px,5vw,70px);padding-bottom:clamp(45px,5vw,70px)}
body.tv-final-release main > section.section:not(.page-hero):not(.tv-examples-hero):not(.tv-pilot-section){
  min-width:0;
}
/* Reviews: compact, usable form without a huge floating white canvas. */
body.tv-final-release .tv-reviews-page form[action*="review-intake"]{
  width:100%;max-width:680px;margin-inline:auto;box-sizing:border-box;
}
body.tv-final-release .tv-reviews-page form[action*="review-intake"] :is(input,textarea){box-sizing:border-box;max-width:100%}
body.tv-final-release .tv-reviews-page form[action*="review-intake"] textarea{min-height:112px}
/* Blog: prevent very long card excerpts from producing towers and ragged alignment. */
body.tv-page-insights .tv-blog-grid>.tv-blog-card{min-width:0}
body.tv-page-insights .tv-blog-grid>.tv-blog-card h3{overflow-wrap:anywhere}
body.tv-page-insights .tv-blog-grid>.tv-blog-card p{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden;
}
/* Ensure keyboard navigation remains visible. */
body.tv-final-release :is(a,button,summary,input,textarea,select):focus-visible{
  outline:3px solid #bd8432;outline-offset:3px;
}
@media(max-width:860px){
  body.tv-final-release main .tv-documents-semantic .tv-semantic-file-grid{grid-template-columns:minmax(0,1fr)!important}
  body.tv-final-release .tv-lab-project-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:600px){
  body.tv-final-release main > section > .container,
  body.tv-final-release main > div.container,
  body.tv-final-release main > .container,
  body.tv-final-release main > section .tv-content-container,
  body.tv-final-release main .tv-integrity-note,
  body.tv-final-release main > .tv-lab-project-section > .container,
  body.tv-final-release main > .tv-geo-method-links > .container,
  body.tv-final-release main > .tv-related-articles > .container{
    width:calc(100% - 30px)!important;
  }
  body.tv-final-release main .tv-documents-semantic .tv-semantic-file-preview table{min-width:410px}
  body.tv-final-release .tv-reviews-page form[action*="review-intake"]{padding-inline:18px}
}
@media(prefers-reduced-motion:reduce){
  body.tv-final-release *{scroll-behavior:auto}
}
