/* ═══════════════════════════════════════════════════════════════
   TESTROUTE TERMS — v2.1.1  Scoped CSS  (Clear Drive)
   ───────────────────────────────────────────────────────────────
   Mirrors the article (single-guide) reading layout so the two pages
   match: ONE grid — lead/hero in column 1 row 1, body in column 1
   row 2, contents sidebar in column 2 spanning both rows, sticky and
   top-aligned with the hero. Same dimensions (content 720/680px, TOC
   240px, gap 56px, 960px breakpoint), same navy reading typography.
   !important throughout for Cornerstone's cascade. No backdrop-filter.
   ═══════════════════════════════════════════════════════════════ */

/* Sticky-TOC fallback: a theme / page-builder overflow-x:hidden on
   html/body turns them into a scroll container and breaks position:sticky.
   `clip` keeps horizontal overflow hidden WITHOUT that side effect.
   Loaded only on the Terms page (shortcode-enqueued). */
html, body { overflow-x: clip !important; }

.tr-terms, .tr-terms *, .tr-terms *::before, .tr-terms *::after {
	box-sizing: border-box !important;
	margin: 0 !important;
	padding: 0 !important;
	text-transform: none !important;
}

/* full-bleed navy (the shortcode sits inside Cornerstone's constrained content) */
.tr-terms {
	position: relative !important;
	left: 50% !important; right: 50% !important;
	margin-left: -50vw !important; margin-right: -50vw !important;
	width: 100vw !important; max-width: 100vw !important;
	overflow-x: clip !important;
	background: #0d1b2a !important;
	font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	-webkit-font-smoothing: antialiased !important;
	color: rgba(255,255,255,.82) !important;
	line-height: 1.5 !important;
	padding: calc(var(--hdr-total-h, 72px) + 20px) 0 96px !important;
}
.tr-terms :focus-visible { outline: 2px solid #03c988 !important; outline-offset: 3px !important; border-radius: 4px !important; }

/* canonical frame — same shell as the article / other pages */
.tr-terms .tr-terms__frame {
	max-width: 1200px !important;
	margin: 0 auto !important;
	padding-left: var(--tr-gutter, 16px) !important;
	padding-right: var(--tr-gutter, 16px) !important;
}

/* ── Layout: ONE grid (matches .trg-art-grid) ── */
.tr-terms .tr-terms__grid { display: block !important; }

@media (min-width: 960px) {
	.tr-terms .tr-terms__grid {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) 240px !important;
		column-gap: 56px !important;
		align-items: start !important;
	}
	.tr-terms .tr-terms__lead { grid-column: 1 !important; grid-row: 1 !important; min-width: 0 !important; }
	.tr-terms .tr-terms__main { grid-column: 1 !important; grid-row: 2 !important; min-width: 0 !important; }
	.tr-terms .tr-terms__toc  {
		grid-column: 2 !important; grid-row: 1 / span 2 !important;
		position: sticky !important; top: calc(var(--hdr-total-h, 72px) + 24px) !important;
		align-self: start !important;
	}
}

/* ── Lead / hero (col 1, row 1) ── */
.tr-terms .tr-terms__lead { max-width: 720px !important; margin-bottom: 44px !important; }

/* Breadcrumb (matches .trh-hero-bread on the pillar pages) */
.tr-terms .tr-terms__bread { display: flex !important; align-items: center !important; gap: 6px !important; font-size: 12px !important; color: rgba(255,255,255,.55) !important; margin-bottom: 22px !important; flex-wrap: wrap !important; }
.tr-terms .tr-terms__bread a { color: rgba(255,255,255,.55) !important; text-decoration: none !important; transition: color .15s ease !important; }
.tr-terms .tr-terms__bread a:hover { color: #fff !important; }
.tr-terms .tr-terms__bread-sep { color: rgba(255,255,255,.3) !important; flex-shrink: 0 !important; }
.tr-terms .tr-terms__bread-cur { color: rgba(255,255,255,.8) !important; font-weight: 500 !important; }

.tr-terms .tr-terms__h1,
.tr-terms h1.tr-terms__h1 {
	margin: 0 0 16px !important; padding: 0 !important; border: none !important;
	font-size: clamp(30px, 4.4vw, 44px) !important;
	font-weight: 800 !important;
	font-family: inherit !important;
	letter-spacing: -.03em !important;
	line-height: 1.08 !important;
	color: #fff !important;
	text-align: left !important;
}

.tr-terms .tr-terms__meta { display: flex !important; flex-wrap: wrap !important; gap: 6px 26px !important; margin-bottom: 4px !important; }
.tr-terms .tr-terms__meta div { display: flex !important; gap: 7px !important; align-items: baseline !important; }
.tr-terms .tr-terms__meta dt { font-size: 11px !important; font-weight: 700 !important; letter-spacing: .05em !important; text-transform: uppercase !important; color: rgba(255,255,255,.38) !important; }
.tr-terms .tr-terms__meta dd { font-size: 13px !important; color: rgba(255,255,255,.6) !important; }
.tr-terms .tr-terms__reg { margin-top: 10px !important; font-size: 12.5px !important; line-height: 1.55 !important; color: rgba(255,255,255,.5) !important; }

.tr-terms .tr-terms__preamble { margin: 22px 0 0 !important; font-size: 18.5px !important; line-height: 1.6 !important; color: rgba(255,255,255,.6) !important; }
.tr-terms .tr-terms__preamble strong { color: rgba(255,255,255,.85) !important; font-weight: 600 !important; }

/* ── Contents sidebar (col 2, spans both rows, sticky) — boxed card like the article ── */
.tr-terms .tr-terms__toc { margin-bottom: 32px !important; }
.tr-terms .tr-terms__toc-toggle { display: none !important; }
.tr-terms .tr-terms__toc-list {
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
}
.tr-terms .tr-terms__toc-label { display: block !important; font-size: 11px !important; font-weight: 800 !important; letter-spacing: .12em !important; text-transform: uppercase !important; color: rgba(255,255,255,.42) !important; margin-bottom: 12px !important; }
.tr-terms .tr-terms__toc ol { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.tr-terms .tr-terms__toc li { margin: 0 !important; }
.tr-terms .tr-terms__toc a { display: flex !important; gap: 9px !important; padding: 7px 0 7px 13px !important; border-left: 2px solid transparent !important; color: rgba(255,255,255,.55) !important; font-size: 14px !important; line-height: 1.4 !important; text-decoration: none !important; transition: color .15s ease, border-color .15s ease !important; }
.tr-terms .tr-terms__toc a:hover { color: #fff !important; }
.tr-terms .tr-terms__toc a.is-active { color: #fff !important; font-weight: 700 !important; border-left-color: #03c988 !important; }
.tr-terms .tr-terms__toc a .n { color: rgba(255,255,255,.34) !important; font-variant-numeric: tabular-nums !important; font-weight: 700 !important; flex: none !important; min-width: 16px !important; transition: color .15s ease !important; }
.tr-terms .tr-terms__toc a.is-active .n, .tr-terms .tr-terms__toc a:hover .n { color: #03c988 !important; }

@media (max-width: 959px) {
	.tr-terms .tr-terms__toc.is-js .tr-terms__toc-toggle { display: flex !important; align-items: center !important; justify-content: space-between !important; width: 100% !important; cursor: pointer !important; background: none !important; border: none !important; border-bottom: 1px solid rgba(255,255,255,.12) !important; border-radius: 0 !important; padding: 0 0 13px !important; color: rgba(255,255,255,.9) !important; font-family: inherit !important; font-size: 13px !important; font-weight: 700 !important; letter-spacing: .04em !important; text-transform: uppercase !important; }
	.tr-terms .tr-terms__toc.is-js .tr-terms__toc-toggle svg { transition: transform .2s ease !important; color: rgba(255,255,255,.5) !important; flex: none !important; }
	.tr-terms .tr-terms__toc.is-js.is-open .tr-terms__toc-toggle svg { transform: rotate(180deg) !important; }
	.tr-terms .tr-terms__toc.is-js .tr-terms__toc-list { display: none !important; margin-top: 8px !important; }
	.tr-terms .tr-terms__toc.is-js.is-open .tr-terms__toc-list { display: block !important; }
	.tr-terms .tr-terms__toc.is-js .tr-terms__toc-label { display: none !important; }
}

/* ── Body (col 1, row 2) ── */
.tr-terms .tr-terms__main { max-width: 720px !important; }
.tr-terms .tr-terms__sec { max-width: 680px !important; scroll-margin-top: calc(var(--hdr-total-h, 72px) + 22px) !important; }
.tr-terms .tr-terms__sec + .tr-terms__sec { margin-top: 0 !important; }

.tr-terms .tr-terms__h2,
.tr-terms h2.tr-terms__h2 {
	font-size: 25px !important;
	font-weight: 800 !important;
	font-family: inherit !important;
	letter-spacing: -.02em !important;
	line-height: 1.25 !important;
	color: rgba(255,255,255,.96) !important;
	margin: 48px 0 18px !important;
	padding: 0 !important; border: none !important; text-align: left !important;
	scroll-margin-top: calc(var(--hdr-total-h, 72px) + 22px) !important;
}
.tr-terms .tr-terms__sec:first-child .tr-terms__h2 { margin-top: 0 !important; }
.tr-terms .tr-terms__h2 .n { color: rgba(255,255,255,.42) !important; font-variant-numeric: tabular-nums !important; font-weight: 800 !important; margin-right: 12px !important; }

/* Plain-language summary (optional) — a muted lead-in */
.tr-terms .tr-terms__brief { margin: 0 0 20px !important; }
.tr-terms .tr-terms__brief-k { font-size: 10.5px !important; font-weight: 800 !important; letter-spacing: .14em !important; text-transform: uppercase !important; color: rgba(255,255,255,.4) !important; margin-right: 10px !important; }
.tr-terms .tr-terms__brief span:last-child { font-size: 16px !important; line-height: 1.62 !important; color: rgba(255,255,255,.6) !important; }

/* "Important" note (optional) — tip-style callout to match the article system */
.tr-terms .tr-terms__note { background: rgba(3,201,136,.10) !important; border: 1px solid rgba(3,201,136,.30) !important; border-left: 3px solid #03c988 !important; border-radius: 12px !important; padding: 16px 18px !important; margin: 0 0 24px !important; }
.tr-terms .tr-terms__note-label { display: block !important; font-size: 10.5px !important; font-weight: 800 !important; letter-spacing: .12em !important; text-transform: uppercase !important; color: #03c988 !important; margin-bottom: 6px !important; }
.tr-terms .tr-terms__note p { font-size: 15.5px !important; line-height: 1.62 !important; color: rgba(255,255,255,.92) !important; }

/* Reading text — matches .trg-art-body */
.tr-terms .tr-terms__body { font-size: 17.5px !important; line-height: 1.75 !important; color: rgba(255,255,255,.82) !important; font-family: inherit !important; }
.tr-terms .tr-terms__body > *:first-child { margin-top: 0 !important; }
.tr-terms .tr-terms__body p { margin: 0 0 22px !important; font-size: 17.5px !important; line-height: 1.75 !important; color: rgba(255,255,255,.82) !important; }
.tr-terms .tr-terms__body p:last-child { margin-bottom: 0 !important; }
.tr-terms .tr-terms__body a { color: #03c988 !important; text-decoration: underline !important; text-underline-offset: 2px !important; text-decoration-thickness: 1px !important; }
.tr-terms .tr-terms__body a:hover { color: #fff !important; }
.tr-terms .tr-terms__body strong, .tr-terms .tr-terms__body b { color: rgba(255,255,255,.95) !important; font-weight: 700 !important; }
.tr-terms .tr-terms__body em { font-style: italic !important; }
.tr-terms .tr-terms__body ul, .tr-terms .tr-terms__body ol { margin: 0 0 22px !important; padding-left: 24px !important; }
.tr-terms .tr-terms__body ul { list-style: disc !important; }
.tr-terms .tr-terms__body ol { list-style: decimal !important; }
.tr-terms .tr-terms__body li { margin: 0 0 10px !important; line-height: 1.7 !important; font-size: 17.5px !important; color: rgba(255,255,255,.82) !important; }
.tr-terms .tr-terms__body ul li::marker { color: #03c988 !important; }
.tr-terms .tr-terms__body ol li::marker { color: rgba(255,255,255,.5) !important; font-weight: 700 !important; }

/* ── Footer ── */
.tr-terms .tr-terms__foot { max-width: 680px !important; padding-top: 30px !important; margin-top: 50px !important; border-top: 1px solid rgba(255,255,255,.12) !important; }
.tr-terms .tr-terms__accept { font-size: 15px !important; line-height: 1.65 !important; color: rgba(255,255,255,.6) !important; margin-bottom: 18px !important; }
.tr-terms .tr-terms__foot-row { display: flex !important; flex-wrap: wrap !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; }
.tr-terms .tr-terms__foot-contact { font-size: 14px !important; color: rgba(255,255,255,.6) !important; }
.tr-terms .tr-terms__foot-contact a { color: #03c988 !important; text-decoration: underline !important; text-underline-offset: 2px !important; }
.tr-terms .tr-terms__totop { display: inline-flex !important; align-items: center !important; gap: 7px !important; font-size: 12.5px !important; font-weight: 600 !important; color: rgba(255,255,255,.48) !important; background: none !important; border: none !important; cursor: pointer !important; font-family: inherit !important; transition: color .15s ease !important; }
.tr-terms .tr-terms__totop:hover { color: #03c988 !important; }
.tr-terms .tr-terms__totop svg { width: 13px !important; height: 13px !important; flex: none !important; }

/* ── Mobile ── */
@media (max-width: 620px) {
	.tr-terms { padding: calc(var(--hdr-total-h, 56px) + 16px) 0 64px !important; }
	.tr-terms .tr-terms__body, .tr-terms .tr-terms__body p, .tr-terms .tr-terms__body li { font-size: 17px !important; }
	.tr-terms .tr-terms__preamble { font-size: 17px !important; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
	.tr-terms *, .tr-terms *::before, .tr-terms *::after { transition-duration: 0.01ms !important; }
}

/* ── Print — black on white, drop the nav ── */
@media print {
	html, body { overflow-x: visible !important; }
	.tr-terms { position: static !important; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; background: #fff !important; color: #111 !important; }
	.tr-terms .tr-terms__bread, .tr-terms .tr-terms__toc, .tr-terms .tr-terms__totop { display: none !important; }
	.tr-terms .tr-terms__frame { max-width: none !important; padding: 0 !important; }
	.tr-terms .tr-terms__grid { display: block !important; }
	.tr-terms .tr-terms__lead, .tr-terms .tr-terms__main, .tr-terms .tr-terms__sec, .tr-terms .tr-terms__foot { max-width: none !important; }
	.tr-terms .tr-terms__h1, .tr-terms .tr-terms__h2 { color: #000 !important; }
	.tr-terms .tr-terms__h2 .n, .tr-terms .tr-terms__meta dt, .tr-terms .tr-terms__brief-k { color: #555 !important; }
	.tr-terms .tr-terms__body, .tr-terms .tr-terms__body p, .tr-terms .tr-terms__body li, .tr-terms .tr-terms__preamble, .tr-terms .tr-terms__meta dd, .tr-terms .tr-terms__accept, .tr-terms .tr-terms__foot-contact { color: #222 !important; }
	.tr-terms .tr-terms__brief span:last-child { color: #444 !important; }
	.tr-terms .tr-terms__body a, .tr-terms .tr-terms__foot-contact a { color: #000 !important; }
	.tr-terms .tr-terms__note { background: #f4f4f4 !important; border-color: #999 !important; }
	.tr-terms .tr-terms__note p, .tr-terms .tr-terms__note-label { color: #000 !important; }
	.tr-terms .tr-terms__foot { border-color: #ccc !important; }
	.tr-terms .tr-terms__body ul li::marker { color: #555 !important; }
}
