/* Conduit Fill V2 site shell: tokens, self-hosted fonts, header/footer and content restyle.
   Light-only design. Fonts: IBM Plex (SIL OFL 1.1), see /v2/fonts/LICENSE-*.txt. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/v2/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/v2/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/v2/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/v2/fonts/ibm-plex-sans-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/v2/fonts/ibm-plex-sans-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/v2/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/v2/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --paper: #fafaf6; --surface: #ffffff;
  --ink: #183ca3; --ink-strong: #10308c; --ink-muted: #4c5d85;
  --line: #b9c6e5; --line-strong: #183ca3;
  --accent: #e6f15b; --accent-soft: #f5f8cf; --copper: #c7924c;
  --positive: #16713f; --positive-soft: #edf8ef;
  --negative: #a52825; --negative-soft: #fff0eb;
  --warning: #725110; --warning-soft: #fff8df;
  --info: #183ca3; --info-soft: #eef2fb;
  --scrim: rgb(13 29 64 / 38%); --focus: #183ca3;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'IBM Plex Sans Condensed', 'Arial Narrow', var(--font-body);
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --text-xs: .8125rem; --text-sm: .875rem; --text-base: 1rem; --text-lg: 1.125rem; --text-xl: 1.5rem;
  --radius-control: 5px; --radius-sheet: 20px; --control-height: 46px;
  --page-max: 1280px; --page-pad: 32px; --summary-height: 108px;
  --ease: cubic-bezier(.2,.65,.25,1); --transition: 140ms var(--ease);
}
@media (max-width: 600px) { :root { --page-pad: 16px; } }

html { color-scheme: light; background: var(--paper); -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
/* Legacy style.css / mobile-responsive.css set overflow-x:hidden (some with !important), which turns
   body into a scroll container and silently breaks the sticky header. Win on specificity. */
:root:root, body.v2-site { overflow-x: clip !important; }
body.v2-site { margin: 0; min-width: 320px; background: var(--paper) !important; color: var(--ink); font-family: var(--font-body); line-height: 1.55; font-synthesis: none; }
.v2-site h1, .v2-site h2, .v2-site h3, .v2-site h4 { font-family: var(--font-display); color: var(--ink-strong); letter-spacing: -.012em; text-wrap: balance; }
.v2-site h1 { font-weight: 700; line-height: 1.12; }
.v2-site h2, .v2-site h3 { font-weight: 700; line-height: 1.2; }
.v2-site h4 { font-weight: 600; }
.v2-site p, .v2-site li, .v2-site dd, .v2-site td { color: inherit; }
.v2-site a { text-underline-offset: 3px; }
.v2-site strong, .v2-site b { color: var(--ink-strong); }
.v2-site code, .v2-site kbd, .v2-site pre, .v2-site .font-mono { font-family: var(--font-mono); }
.v2-site ::selection { background: var(--accent); color: var(--ink-strong); }

/* Focus and motion */
.v2-site a:focus-visible, .v2-site button:focus-visible, .v2-site input:focus-visible, .v2-site select:focus-visible,
.v2-site textarea:focus-visible, .v2-site summary:focus-visible, .v2-site [tabindex]:focus-visible { outline: 3px solid var(--focus) !important; outline-offset: 3px; box-shadow: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .v2-site *, .v2-site *::before, .v2-site *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Skip link */
.v2-site a[href="#main-content"].sr-only:focus, .v2-skip:focus { position: fixed !important; top: 12px; left: 16px; z-index: 200; padding: 12px 18px; background: var(--accent) !important; color: var(--ink-strong) !important; border-radius: 0 !important; font-weight: 600; width: auto; height: auto; clip: auto; }

/* ---------- Header ---------- */
.v2-header { position: sticky; top: var(--v2-top-inset, 0px); z-index: 60; background: var(--paper); border-bottom: 1.5px solid var(--line-strong); }
.v2-header-inner { max-width: calc(var(--page-max) + var(--page-pad) * 2); margin: 0 auto; padding: 0 var(--page-pad); min-height: 72px; display: flex; align-items: center; gap: 24px; position: relative; }
.v2-brand { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 44px; }
.v2-brand img { width: 206px; height: 38px; display: block; }
.v2-free { padding-left: 24px; border-left: 1px solid var(--ink); white-space: nowrap; font-size: var(--text-sm); color: var(--ink); }
.v2-nav { margin-left: auto; display: flex; align-items: stretch; gap: 28px; align-self: stretch; }
.v2-nav > a, .v2-more-btn { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; color: var(--ink); text-decoration: none; font: 500 1rem/1.3 var(--font-body); background: none; border: 0; cursor: pointer; position: relative; }
.v2-nav > a:hover, .v2-more-btn:hover { color: var(--ink-strong); text-decoration: underline; text-decoration-thickness: 2px; }
.v2-nav > a[aria-current]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 11px; height: 3px; background: var(--ink); }
.v2-more { position: relative; display: flex; }
.v2-chev { width: 16px; height: 16px; transition: transform var(--transition); }
.v2-more-btn[aria-expanded="true"] .v2-chev { transform: rotate(180deg); }
.v2-more-menu { position: absolute; top: calc(100% + 1px); right: 0; width: 560px; padding: 20px 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 24px; background: var(--surface); border: 1px solid var(--ink); border-top-width: 2px; z-index: 70; }
.v2-more-menu[hidden] { display: none; }
.v2-menu-label { margin: 0 0 6px; font-size: .75rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-muted); }
.v2-more-menu a, .v2-mobile-menu a { display: flex; align-items: center; min-height: 40px; color: var(--ink); text-decoration: none; font-size: var(--text-sm); }
.v2-more-menu a:hover, .v2-mobile-menu a:hover { text-decoration: underline; }
.v2-menu-btn { display: none; width: 44px; height: 44px; padding: 10px; margin-left: auto; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; color: var(--ink); cursor: pointer; }
.v2-menu-btn svg { width: 24px; height: 24px; }
.v2-mobile-menu { border-top: 1px solid var(--line); background: var(--surface); padding: 8px var(--page-pad) 16px; max-height: calc(100vh - 60px); overflow-y: auto; }
.v2-mobile-menu[hidden] { display: none; }
.v2-mobile-menu a { min-height: 46px; font-size: var(--text-base); border-bottom: 1px solid var(--line); }
.v2-mobile-menu .v2-menu-label { margin-top: 16px; }
.v2-mobile-group { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
@media (max-width: 1100px) { .v2-free { display: none; } .v2-nav { gap: 22px; } }
@media (max-width: 900px) {
  .v2-nav { display: none; }
  .v2-menu-btn { display: inline-flex; }
  .v2-header-inner { min-height: 60px; justify-content: space-between; }
  .v2-brand img { width: 174px; height: 32px; }
}
@media (max-width: 374px) { .v2-brand img { width: 154px; height: 29px; } }

/* ---------- Breadcrumbs ---------- */
.v2-site nav[aria-label="Breadcrumb"] { background: var(--paper) !important; border-bottom: 1px solid var(--line) !important; font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; }
.v2-site nav[aria-label="Breadcrumb"] a { color: var(--ink) !important; text-decoration: underline; text-decoration-color: var(--line); }
.v2-site nav[aria-label="Breadcrumb"] a:hover { text-decoration-color: var(--ink); }
.v2-site nav[aria-label="Breadcrumb"] li, .v2-site nav[aria-label="Breadcrumb"] span { color: var(--ink-muted); }
.v2-site nav[aria-label="Breadcrumb"] ol { flex-wrap: wrap; row-gap: 2px; }

/* ---------- Content restyle (overrides Tailwind utilities and page styles) ---------- */
.v2-site main { color: var(--ink); }
.v2-site [class*="bg-gradient-"] { background-image: none !important; }
.v2-site main > section[class*="bg-gradient-"], .v2-site main > header[class*="bg-gradient-"], .v2-site > section[class*="bg-gradient-"] { background-color: var(--paper) !important; border-bottom: 1px solid var(--line); }
.v2-site .bg-gray-50, .v2-site .bg-slate-50 { background-color: var(--paper) !important; }
.v2-site main .bg-white, .v2-site aside .bg-white { background-color: var(--surface) !important; }
.v2-site main section.bg-white { background-color: transparent !important; border-top: 1px solid var(--line); }
.v2-site [class~="shadow"], .v2-site [class~="shadow-sm"], .v2-site [class~="shadow-md"], .v2-site [class~="shadow-lg"], .v2-site [class~="shadow-xl"], .v2-site [class~="shadow-2xl"] { box-shadow: none !important; border: 1px solid var(--line); }
.v2-site a[class~="shadow"]:hover, .v2-site a[class~="shadow-md"]:hover, .v2-site a[class~="shadow-lg"]:hover, .v2-site a[class~="shadow-sm"]:hover, .v2-site a.block.rounded-lg:hover { border-color: var(--ink) !important; box-shadow: inset 0 -3px 0 var(--accent) !important; transform: none !important; }
.v2-site [class*="rounded"]:not(.rounded-full):not(.v2-keep-radius) { border-radius: var(--radius-control) !important; }
.v2-site .border-l-4 { border-left-width: 3px !important; border-left-color: var(--ink) !important; border-radius: 0 !important; }
.v2-site .border-2 { border-width: 1px !important; }
.v2-site .border-dashed { border-style: dashed !important; }
.v2-site hr { border: 0; border-top: 1px solid var(--line); }
.v2-site .hover\:-translate-y-1:hover, .v2-site .transform:hover { transform: none !important; }

/* Section labels: uppercase, letter-spaced */
.v2-eyebrow, .v2-site .uppercase.tracking-wide, .v2-site .uppercase.tracking-wider { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; letter-spacing: .11em !important; text-transform: uppercase; color: var(--ink); }
.v2-site main h2 { position: relative; }
.v2-site main article h2, .v2-site main > section > h2, .v2-site main > div > h2, .v2-site main .prose h2 { padding-top: 14px; border-top: 2px solid var(--ink); }
.v2-site main .text-center h2, .v2-site main h2.text-center { border-top: 0; padding-top: 0; }

/* Prose & custom article classes */
.v2-site .prose { color: var(--ink); max-width: none; }
.v2-site .prose h2 { color: var(--ink-strong) !important; font-size: 1.625rem; margin-top: 2.25rem; margin-bottom: 1rem; }
.v2-site .prose h3 { color: var(--ink-strong) !important; font-size: 1.25rem; margin-top: 1.6rem; margin-bottom: .6rem; }
.v2-site .prose p, .v2-site .prose li { color: var(--ink) !important; line-height: 1.7; }
.v2-site .prose a, .v2-site main p a, .v2-site main li a:not([class*="bg-"]), .v2-site .prose a.calc-link, .v2-site .nec9 a:not(.primary-cta), .v2-site td a { color: var(--ink) !important; text-decoration: underline; text-decoration-color: var(--ink); text-decoration-thickness: 1px; }
.v2-site .prose a:hover, .v2-site main p a:hover { background: var(--accent-soft); }
.v2-site .example-box, .v2-site .formula-box, .v2-site .code-box, .v2-site .table-box, .v2-site .table-reference,
.v2-site .nec9 .example-box, .v2-site .answer-box, .v2-site .nec9 .answer-box, .v2-site .stats-card, .v2-site .icon-container {
  background: var(--surface) !important; border: 1px solid var(--line) !important; border-top: 2px solid var(--ink) !important; border-radius: var(--radius-control) !important; box-shadow: none !important; color: var(--ink); }
.v2-site .formula-box, .v2-site .code-box { font-family: var(--font-mono); background: var(--paper) !important; }
.v2-site .tip-box, .v2-site .decision-box, .v2-site .cta-box, .v2-site .answer-box { background: var(--accent-soft) !important; border: 1px solid var(--ink) !important; border-left: 3px solid var(--ink) !important; border-radius: var(--radius-control) !important; color: var(--ink) !important; background-image: none !important; }
.v2-site .cta-box *, .v2-site .tip-box * { color: var(--ink-strong) !important; }
.v2-site .cta-box a[class*="bg-"], .v2-site .cta-box .bg-white { background: var(--ink) !important; color: #fff !important; }
.v2-site .warning-box { background: var(--warning-soft) !important; border: 1px solid var(--warning) !important; border-left: 3px solid var(--warning) !important; border-radius: var(--radius-control) !important; color: var(--warning); }
.v2-site .example { background: var(--surface) !important; border: 1px solid var(--line) !important; border-top: 2px solid var(--ink) !important; border-left: 1px solid var(--line) !important; border-radius: var(--radius-control) !important; color: var(--ink); }
/* Semantic article callouts: same family as the Quick Answer box (1px frame + 3px leading rule). */
.v2-site .mistake-box { background: var(--negative-soft) !important; border: 1px solid var(--negative) !important; border-left: 3px solid var(--negative) !important; border-radius: var(--radius-control) !important; }
.v2-site .mistake-box h3, .v2-site .mistake-box h4, .v2-site .mistake-box strong { color: var(--negative) !important; }
.v2-site .best-practice-box { background: var(--positive-soft) !important; border: 1px solid var(--positive) !important; border-left: 3px solid var(--positive) !important; border-radius: var(--radius-control) !important; }
.v2-site .best-practice-box h3, .v2-site .best-practice-box h4, .v2-site .best-practice-box strong { color: var(--positive) !important; }
.v2-site .note-box { background: var(--info-soft) !important; border: 1px solid var(--info) !important; border-left: 3px solid var(--info) !important; border-radius: var(--radius-control) !important; color: var(--ink); }
.v2-site .warning-box h3, .v2-site .warning-box h4, .v2-site .warning-box strong { color: var(--warning) !important; }
.v2-site .mistake-box p, .v2-site .mistake-box li, .v2-site .best-practice-box p, .v2-site .best-practice-box li, .v2-site .warning-box p, .v2-site .warning-box li, .v2-site .note-box p, .v2-site .note-box li { color: var(--ink) !important; }
.v2-site .pro-con-box { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: var(--radius-control) !important; box-shadow: none !important; }
.v2-site .related-articles { background: transparent !important; border: 0 !important; border-top: 2px solid var(--ink) !important; border-radius: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
.v2-site .article-card, .v2-site .resource-card { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: var(--radius-control) !important; box-shadow: none !important; transform: none !important; }
.v2-site .article-card:hover, .v2-site .resource-card:hover { border-color: var(--ink) !important; box-shadow: inset 0 -3px 0 var(--accent) !important; }
.v2-site .category-tag, .v2-site .popular-badge, .v2-site [class*="tag-"] { background: transparent !important; color: var(--ink) !important; border: 1px solid var(--ink); border-radius: 2px !important; font-family: var(--font-mono); font-size: .75rem !important; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px !important; }
.v2-site .category-btn, .v2-site .category-filter { min-height: 44px; background: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; border-radius: var(--radius-control) !important; font-weight: 500; }
.v2-site .category-btn:hover, .v2-site .category-filter:hover { border-color: var(--ink) !important; }
.v2-site .category-btn.active, .v2-site .category-filter.active { background: var(--accent) !important; border-color: var(--ink) !important; color: var(--ink-strong) !important; }
.v2-site .stats-number { color: var(--ink-strong) !important; -webkit-text-fill-color: currentColor !important; background: none !important; font-family: var(--font-mono); }
.v2-site .search-box input { border: 1px solid var(--ink) !important; border-radius: var(--radius-control) !important; min-height: 46px; box-shadow: none !important; }
.v2-site .bookmark-btn { min-width: 44px; min-height: 44px; }

/* Tables */
.v2-site main table:not(.v2-calc *), .v2-site .chart-table, .v2-site .comparison-table, .v2-site .nec-table, .v2-site .nec9 table { border-collapse: collapse !important; background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: 0 !important; color: var(--ink); font-variant-numeric: tabular-nums; }
.v2-site main thead, .v2-site main thead tr, .v2-site .nec9 thead { background: var(--surface) !important; }
.v2-site main th:not(.v2-calc *), .v2-site .chart-table th, .v2-site .comparison-table th, .v2-site .nec-table th, .v2-site .nec9 th { background: var(--surface) !important; color: var(--ink-strong) !important; font-family: var(--font-body); font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border: 0 !important; border-bottom: 2px solid var(--ink) !important; }
.v2-site main tbody th, .v2-site .nec9 th[scope=row] { text-transform: none; letter-spacing: 0; font-size: inherit; border-bottom: 1px solid var(--line) !important; background: var(--paper) !important; }
.v2-site main td:not(.v2-calc *), .v2-site .chart-table td, .v2-site .comparison-table td, .v2-site .nec-table td, .v2-site .nec9 td { border: 0 !important; border-bottom: 1px solid var(--line) !important; color: var(--ink); }
.v2-site main tr.border-t, .v2-site main tr.border-b { border-color: var(--line) !important; }
.v2-site main tbody tr:hover, .v2-site .chart-table tbody tr:hover, .v2-site .comparison-table tr:hover { background: var(--accent-soft) !important; }
.v2-site main tbody tr:nth-child(even) { background: transparent; }
.v2-site main caption { color: var(--ink-muted); font-size: var(--text-sm); text-align: left; caption-side: top; padding: 0 0 8px; }
.v2-site main .overflow-x-auto { border-radius: 0 !important; max-width: 100%; -webkit-overflow-scrolling: touch; }

/* FAQ accordions */
.v2-site main details:not(.v2-calc *) { background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; box-shadow: none !important; }
.v2-site main details:not(.v2-calc *) > summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: var(--ink-strong); padding-top: 8px; padding-bottom: 8px; }
.v2-site main details:not(.v2-calc *) > summary::-webkit-details-marker { display: none; }
.v2-site main details:not(.v2-calc *) > summary::after { content: '+'; font: 500 1.5rem/1 var(--font-mono); color: var(--ink); flex-shrink: 0; }
.v2-site main details[open]:not(.v2-calc *) > summary::after { content: '\2212'; }
.v2-site main details:not(.v2-calc *) > summary > svg { display: none; }

/* Buttons & form controls (tool calculators) */
.v2-site main a[class*="bg-blue-"], .v2-site main button[class*="bg-blue-"], .v2-site main a[class*="bg-indigo-"], .v2-site main button[class*="bg-indigo-"],
.v2-site main a[class*="bg-green-"], .v2-site main button[class*="bg-green-"], .v2-site .primary-cta {
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--ink) !important; color: #fff !important; border: 1px solid var(--ink) !important; border-radius: var(--radius-control) !important; font-family: var(--font-display); font-weight: 600; text-decoration: none !important; }
.v2-site main a[class*="bg-blue-"]:hover, .v2-site main button[class*="bg-blue-"]:hover, .v2-site main button[class*="bg-green-"]:hover, .v2-site .primary-cta:hover { background: var(--ink-strong) !important; }
.v2-site main a[class*="bg-blue-5"], .v2-site main a[class*="bg-blue-1"], .v2-site main div[class*="bg-blue-5"] a[class*="bg-blue-"] { }
.v2-site main a.bg-blue-50, .v2-site main a.bg-blue-100, .v2-site main button.bg-blue-50, .v2-site main button.bg-blue-100 { background: var(--accent-soft) !important; color: var(--ink) !important; }
.v2-site main button[class*="bg-gray-"], .v2-site main a[class*="bg-gray-6"], .v2-site main a[class*="bg-gray-7"] { min-height: 46px; background: transparent !important; color: var(--ink) !important; border: 1px solid var(--ink) !important; border-radius: var(--radius-control) !important; font-family: var(--font-display); font-weight: 600; }
.v2-site main button[class*="bg-gray-"]:hover { background: var(--accent-soft) !important; }
.v2-site main button[class*="bg-red-"] { background: transparent !important; color: var(--negative) !important; border: 1px solid var(--negative) !important; min-height: 44px; min-width: 44px; }
.v2-site main :is(select, input[type="number"], input[type="text"], input[type="search"], input[type="email"], textarea):not(.v2-calc *) {
  min-height: 46px; background-color: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--ink) !important; border-radius: var(--radius-control) !important; font-family: var(--font-body); font-size: 1rem; box-shadow: none !important; }
.v2-site main select:not(.v2-calc *) { -webkit-appearance: none; appearance: none; padding-right: 40px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23183ca3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 18px !important; }
.v2-site main :is(input[type="checkbox"], input[type="radio"]):not(.v2-calc *) { accent-color: var(--ink); width: 20px; height: 20px; }
.v2-site main label:not(.v2-calc *) { color: var(--ink); }
.v2-site .v2-calc h2, .v2-site .v2-calc h3 { color: inherit; letter-spacing: normal; }
.v2-site .v2-calc .page-heading h1, .v2-site .v2-calc .calc-heading { color: var(--ink); letter-spacing: -.018em; }
.v2-site main label.block.text-sm, .v2-site main label.block.font-medium { font-size: var(--text-sm); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.v2-site main [role="progressbar"], .v2-site main .bg-gray-200.rounded-full { background: var(--surface) !important; border: 1px solid var(--ink); }

/* Status colours from tool results stay semantic */
.v2-site .text-green-600, .v2-site .text-green-700, .v2-site .text-green-800 { color: var(--positive) !important; }
.v2-site .text-red-600, .v2-site .text-red-700, .v2-site .text-red-800 { color: var(--negative) !important; }
.v2-site .text-yellow-700, .v2-site .text-yellow-800, .v2-site .text-amber-700, .v2-site .text-amber-800, .v2-site .text-orange-700, .v2-site .text-orange-800 { color: var(--warning) !important; }

/* Page hero blocks: flat paper with a navy rule */
.v2-site main > header, .v2-site article > header { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.v2-site article > header h1, .v2-site main > h1, .v2-site main > header h1 { color: var(--ink-strong); }

/* ---------- Sidebar ad layout (keep 300x600 slot working) ---------- */
.v2-site .sidebar-layout { max-width: calc(var(--page-max) + var(--page-pad) * 2); }
.v2-site .site-sidebar .bg-white { border: 1px solid var(--line) !important; border-top: 2px solid var(--ink) !important; }
.v2-site .site-sidebar p.font-semibold { font-size: var(--text-sm); letter-spacing: .11em; text-transform: uppercase; }
.v2-site .site-sidebar a { color: var(--ink) !important; }
.v2-site .ad-slot-sidebar { position: sticky; top: 88px; }

/* ---------- Footer ---------- */
.v2-footer { margin-top: 56px; background: var(--paper); color: var(--ink); border-top: 1.5px solid var(--ink); }
.v2-footer-top { max-width: calc(var(--page-max) + var(--page-pad) * 2); margin: 0 auto; padding: 22px var(--page-pad); display: flex; gap: 20px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.v2-footer-tools { display: flex; gap: 6px 24px; align-items: center; flex-wrap: wrap; font-size: var(--text-sm); }
.v2-footer-tools strong { font-family: var(--font-display); font-size: 1.125rem; color: var(--ink-strong); margin-right: 4px; }
.v2-footer-tools a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); }
.v2-footer-tools svg { width: 20px; height: 20px; }
.v2-footer-brand { display: flex; align-items: center; gap: 10px; font-size: var(--text-xs); white-space: nowrap; }
.v2-footer h4 { font-family: var(--font-body) !important; font-size: .8125rem !important; font-weight: 600 !important; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-strong) !important; margin-bottom: 10px !important; }
.v2-footer a { color: var(--ink) !important; text-decoration: none; }
.v2-footer a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.v2-footer ul a { display: inline-flex; align-items: center; min-height: 32px; }
.v2-footer ul.space-y-2 > * + * { margin-top: 0 !important; }
.v2-footer p, .v2-footer .text-gray-300, .v2-footer .text-gray-400 { color: var(--ink-muted) !important; }
.v2-footer .border-gray-700 { border-color: var(--line) !important; }
.v2-footer .grid.gap-3 a { min-height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius-control); padding: 4px 6px; font-size: .8125rem; background: var(--surface); }
.v2-footer .grid.gap-3 a:hover { border-color: var(--ink); text-decoration: none; }
@media (max-width: 760px) {
  .v2-footer-top { flex-direction: column; align-items: flex-start; }
  .v2-footer-tools strong { width: 100%; }
  .v2-footer-brand { display: none; }
  .v2-footer .grid.gap-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ---------- Homepage specifics ---------- */
.v2-home-hero { max-width: calc(var(--page-max) + var(--page-pad) * 2); margin: 0 auto; padding: 28px var(--page-pad) 6px; }
.v2-home-hero h1 { font-size: clamp(1.75rem, 3.1vw, 2.75rem); margin: 0 0 8px; }
.v2-home-hero p { max-width: 760px; color: var(--ink-muted); font-size: var(--text-lg); margin: 0; }
.v2-calc-wrap { border-top: 0; }
.v2-calc .calc-heading { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.v2-calc .reference-section .reference-title h3 { font-size: 1.625rem; margin: 0; }
.v2-calc .reference-section > p.reference-rule { font-size: var(--text-sm); color: var(--ink); margin-top: 6px; }
.v2-dialogs.v2-calc { padding: 0 !important; margin: 0 !important; max-width: none !important; }
.v2-calc .prefill-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 8px 8px 8px 14px; background: var(--accent-soft); border: 1px solid var(--ink); border-radius: var(--radius-control); font-size: var(--text-sm); }
.v2-calc .prefill-note button { min-height: 44px; padding: 0 12px; background: transparent; border: 1px solid var(--ink); border-radius: var(--radius-control); color: var(--ink); font-weight: 600; cursor: pointer; }
@media (max-width: 600px) {
  .v2-home-hero { padding-top: 16px; }
  .v2-home-hero h1 { font-size: 1.625rem; }
  .v2-home-hero p { font-size: var(--text-base); }
  .v2-calc .calc-heading { font-size: 1.5rem; white-space: normal; }
  html.calc-offscreen .v2-calc .result-strip { transform: translateY(110%); visibility: hidden; }
  .v2-calc .result-strip { transition: transform var(--transition), visibility var(--transition); }
}

/* Mobile spacing */
@media (max-width: 640px) {
  .v2-site main table { font-size: .875rem; }
  .v2-site main .p-6, .v2-site main .p-8 { padding: 18px !important; }
}

@media print {
  .v2-header, .v2-footer, .site-sidebar { display: none !important; }
}

/* Calculator heading on mobile: keep tag/help/reset in flow (no overlap) and keep Reset reachable */
@media (max-width: 600px) {
  .v2-site .v2-calc .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
  .v2-site .v2-calc .page-heading .desktop-intro { display: none; }
  .v2-site .v2-calc .heading-actions { position: static; gap: 6px; flex-shrink: 0; }
  .v2-site .v2-calc .heading-actions .reset-button { display: inline-flex; min-height: 44px; padding: 0 10px; font-size: var(--text-sm); }
  .v2-site .v2-calc .heading-actions .help-button { width: 44px; height: 44px; }
  .v2-site .v2-calc .calc-heading { white-space: normal; }
}

/* Cookie banner (cookie-consent.js) in V2 colours */
.v2-site #cookie-consent-banner { background: var(--surface) !important; color: var(--ink) !important; border-top: 2px solid var(--ink) !important; box-shadow: 0 -1px 0 var(--line) !important; padding: 18px var(--page-pad) !important; }
.v2-site #cookie-consent-banner h3 { color: var(--ink-strong) !important; font-family: var(--font-display); }
.v2-site #cookie-consent-banner p { color: var(--ink) !important; }
.v2-site #cookie-consent-banner svg { color: var(--ink) !important; }
.v2-site #cookie-consent-banner a { color: var(--ink) !important; }
.v2-site #cookie-consent-banner button { min-height: 46px; border-radius: var(--radius-control) !important; box-shadow: none !important; transform: none !important; font-family: var(--font-display); font-weight: 600; }
.v2-site #cookie-consent-banner #cookie-accept { background: var(--ink) !important; color: #fff !important; border: 1px solid var(--ink); }
.v2-site #cookie-consent-banner #cookie-essential, .v2-site #cookie-consent-banner #cookie-decline { background: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--ink); }
@media (max-width: 640px) {
  .v2-site #cookie-consent-banner { padding: 14px 16px !important; }
  .v2-site #cookie-consent-banner .gap-6 { gap: 12px !important; }
  .v2-site #cookie-consent-banner .sm\:flex-row, .v2-site #cookie-consent-banner .flex-col.gap-3 { flex-direction: row !important; flex-wrap: wrap; gap: 8px !important; }
  .v2-site #cookie-consent-banner button { flex: 1 1 auto; padding: 0 12px !important; }
  /* Compact mobile banner: <= ~18% of a 390x844 viewport, one button row. */
  .v2-site #cookie-consent-banner { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important; border-top-width: 2px !important; }
  .v2-site #cookie-consent-banner .gap-6 { gap: 8px !important; }
  .v2-site #cookie-consent-banner .mb-3 { margin-bottom: 2px !important; }
  .v2-site #cookie-consent-banner svg { display: none; }
  .v2-site #cookie-consent-banner h3 { font-size: .875rem !important; line-height: 1.2; }
  .v2-site #cookie-consent-banner p { font-size: .75rem !important; line-height: 1.35 !important; }
  .v2-site #cookie-consent-banner a { font-size: .75rem !important; margin-top: 2px !important; }
  .v2-site #cookie-consent-banner .flex-col.gap-3 { flex-wrap: nowrap !important; width: 100%; gap: 6px !important; }
  .v2-site #cookie-consent-banner button { min-height: 44px; padding: 0 6px !important; font-size: .75rem !important; white-space: nowrap; flex: 1 1 0; min-width: 0; }
}
.v2-site .category-tag, .v2-site [class*="tag-"] { width: fit-content; max-width: 100%; }

/* Secondary tool pages (main.v2-tool): V2 outline controls, navy 2px, no grey filled buttons. */
.v2-site main.v2-tool :is(select, input[type="number"], input[type="text"]) { border: 2px solid var(--ink) !important; }
.v2-site main.v2-tool :is(select, input):focus-visible { outline: 3px solid var(--accent) !important; outline-offset: 1px; }
.v2-site main.v2-tool button[class*="bg-gray-"], .v2-site main.v2-tool button[class*="bg-white"] { background: transparent !important; color: var(--ink) !important; border: 2px solid var(--ink) !important; border-radius: var(--radius-control) !important; font-family: var(--font-display); font-weight: 600; min-height: 46px; }
.v2-site main.v2-tool button[class*="bg-gray-"]:hover, .v2-site main.v2-tool button[class*="bg-white"]:hover { background: var(--accent-soft) !important; }
.v2-site main.v2-tool button[class*="bg-blue-"] { border: 2px solid var(--ink) !important; }
.v2-site main.v2-tool label { color: var(--ink) !important; }

/* Round 2: calculator H1 lives in the calculator heading; long intro sits below the tool. */
.v2-site .v2-calc h1.calc-heading { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.15; }
@media (max-width: 640px) { .v2-site .v2-calc h1.calc-heading { font-size: 1.25rem !important; } }
.v2-site .v2-home-intro, .v2-site .v2-calc-intro { max-width: 72rem; margin: 0 auto; padding: 24px var(--page-pad) 8px; color: var(--ink); }
.v2-site .v2-home-intro p, .v2-site .v2-calc-intro p { max-width: 68ch; color: var(--ink) !important; font-size: 1rem; line-height: 1.6; }
/* Invalid shared-link state */
.v2-calc .prefill-block { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--negative); border-left: 3px solid var(--negative); border-radius: var(--radius-control); background: var(--negative-soft); color: var(--negative); }
.v2-calc .prefill-block strong { font-family: var(--font-display); font-size: 1rem; }
.v2-calc .prefill-block-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-calc .prefill-block-actions button { min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-family: var(--font-display); font-weight: 600; cursor: pointer; }
.v2-calc .prefill-block-actions button:hover { background: var(--accent-soft); }
.v2-calc .prefill-block-actions button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
@media (max-width: 640px) {
  /* Long calculator H1s get the full width; actions sit on their own row. */
  .v2-site .v2-calc .page-heading { flex-wrap: wrap; align-items: center; padding-top: 12px !important; padding-bottom: 10px !important; row-gap: 6px; }
  .v2-site .v2-calc .page-heading > div:first-child { flex: 1 1 100%; }
  .v2-site .v2-calc .heading-actions { margin-left: auto; }
  /* Cookie text and policy link share one paragraph flow to save a line. */
  .v2-site #cookie-consent-banner .flex-1 > p, .v2-site #cookie-consent-banner .flex-1 > a { display: inline !important; }
  .v2-site #cookie-consent-banner .flex-1 > p::after { content: " "; }
}
@media (max-width: 640px) {
  .v2-site #cookie-consent-banner .flex-1 { font-size: .75rem; line-height: 1.35; }
  .v2-site #cookie-consent-banner .flex-1 > .flex { display: inline !important; margin: 0 !important; }
  .v2-site #cookie-consent-banner .flex-1 h3 { display: inline; font-size: .8125rem !important; }
  .v2-site #cookie-consent-banner .flex-1 h3::after { content: ": "; }
  /* Calculator first screen: no extra main padding; actions share the "Your conduit" row. */
  .v2-site main:has(> .v2-calc), .v2-site main > .v2-calc { padding-top: 0 !important; }
  .v2-site .v2-calc .page-heading { position: relative; padding-bottom: 6px !important; }
  .v2-site .v2-calc .heading-actions { position: absolute !important; top: 100% !important; bottom: auto !important; right: 0; margin-top: 3px; z-index: 1; }
  .v2-site .v2-calc .conduit-section .eyebrow { min-height: 50px; display: flex; align-items: center; margin: 0; }
  .v2-site .v2-calc .conduit-section { padding-top: 0 !important; }
}
@media (max-width: 640px) { .v2-site .v2-calc .prefill-block { margin-top: 58px; } }

/* Round 3: maximum wire fill chart tables share the V2 table treatment */
.v2-site .chart-table { box-shadow: none !important; border-radius: 0 !important; }
.v2-site .chart-table th { border-radius: 0 !important; }

/* Keep anchor targets and headings clear of the sticky header, including when an
   ad script adds a fixed top anchor or body padding (--v2-top-inset, set by site.js). */
html { scroll-padding-top: 0; } /* offset lives in scroll-margin-top below (the two would add up) */
.v2-site [id], .v2-site h1, .v2-site h2, .v2-site h3 { scroll-margin-top: calc(var(--v2-top-inset, 0px) + var(--v2-header-h, 76px) + 16px); }
@media (max-width: 600px) {
  .v2-site [id], .v2-site h1, .v2-site h2, .v2-site h3 { scroll-margin-top: calc(var(--v2-top-inset, 0px) + var(--v2-header-h, 62px) + 12px); }
}

/* Round 4: compact consent banner on tablet/desktop so the calculator result stays visible. */
@media (min-width: 641px) {
  .v2-site #cookie-consent-banner { padding: 10px var(--page-pad) !important; }
  .v2-site #cookie-consent-banner .gap-6 { gap: 10px 20px !important; }
  .v2-site #cookie-consent-banner svg { display: none; }
  .v2-site #cookie-consent-banner .flex-1 { font-size: .8125rem; line-height: 1.4; }
  .v2-site #cookie-consent-banner .flex-1 > .flex, .v2-site #cookie-consent-banner .flex-1 > p, .v2-site #cookie-consent-banner .flex-1 > a { display: inline !important; margin: 0 !important; }
  .v2-site #cookie-consent-banner .flex-1 > p::after { content: " "; }
  .v2-site #cookie-consent-banner .flex-1 h3 { display: inline; font-size: .875rem !important; }
  .v2-site #cookie-consent-banner .flex-1 h3::after { content: ": "; }
  .v2-site #cookie-consent-banner p, .v2-site #cookie-consent-banner a { font-size: .8125rem !important; }
  .v2-site #cookie-consent-banner .flex-col.gap-3 { gap: 8px !important; }
  .v2-site #cookie-consent-banner button { min-height: 44px; padding: 0 16px !important; }
}
/* Round 4: tighter mobile banner (all 3 choices, 44px targets kept). */
@media (max-width: 640px) {
  .v2-site #cookie-consent-banner { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)) !important; }
  .v2-site #cookie-consent-banner .gap-6 { gap: 6px !important; }
  .v2-site #cookie-consent-banner .flex-1 { line-height: 1.3; }
}
