/* All selectors scoped to TillDrive components. Works with popular WordPress themes. */
.td-shell,.td-editorial,.td-catalog{--td-ink:#1c2b21;--td-muted:#5a6e60;--td-primary:#2c9b44;--td-accent:#9ace75;--td-line:#dce9df;--td-soft:#f3faf4;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--td-ink);font-size:16px;line-height:1.65;max-width:1100px;margin:0 auto 34px;letter-spacing:normal}
.td-shell *,.td-editorial *,.td-catalog *{box-sizing:border-box}
.td-shell{container-type:inline-size;border:1px solid #dde9df;border-radius:22px;overflow:hidden;background:#fff;box-shadow:0 8px 32px rgba(15,57,65,.055)}
.td-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 26px;background:#fff}
.td-brand{display:flex;align-items:center;gap:9px;color:#18291d;font-size:19px;font-weight:830;line-height:1.1;letter-spacing:-.7px}
.td-brand a,.td-brand img{max-height:40px;width:auto}
.td-brand .custom-logo-link{display:inline-flex;align-items:center}
.td-brandmark{width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;color:white;border-radius:10px;background:linear-gradient(135deg,#1bb4a9,#075f7b);font-size:20px}
.td-turquoise{color:#2eb34a}
.td-chip{border:1px solid #dbeadc;background:#f1fbf1;padding:5px 12px;border-radius:20px;font-size:12px;font-weight:700;color:#247e39;white-space:normal;text-align:right}
.td-hero{min-height:225px;display:flex;align-items:center;justify-content:space-between;gap:10px;position:relative;padding:27px 30px 27px 34px;background:linear-gradient(115deg,#14251a 0%,#1d3c27 65%,#285536 100%);isolation:isolate}
.td-hero:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 82% 35%,rgba(47,204,183,.18),transparent 45%);pointer-events:none;z-index:-1}
.td-hero-copy{position:relative;z-index:2;max-width:680px}
.td-eyebrow{font-size:11px;letter-spacing:2px;color:#9bebaa;font-weight:800;margin-bottom:8px}
.td-hero h2{font-size:clamp(25px,3.15vw,38px)!important;color:#fff!important;margin:0 0 10px!important;line-height:1.17;font-weight:820;letter-spacing:-.9px}
.td-hero p{color:#e2f3e5;font-size:14px;line-height:1.6;margin:0;max-width:580px}
.td-hero img{width:min(42%,345px);height:auto;object-fit:contain;flex-shrink:0;border:0;border-radius:12px;mix-blend-mode:screen}
.td-calculator{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(285px,.88fr);gap:20px;padding:23px;background:#f5faf6}
.td-form-box,.td-output-box,.td-graph-box{border:1px solid #dfe9e1;background:#fff;border-radius:17px;padding:25px;box-shadow:0 3px 12px rgba(18,41,60,.025)}
.td-form-box h3,.td-output-box h3,.td-graph-box h3{margin:0 0 3px!important;font-size:20px!important;font-weight:770;color:#1b3022;line-height:1.3}
.td-support{font-size:13px;color:#617167;margin:0 0 20px!important}
.td-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 15px;margin:20px 0}
.td-field{min-width:0}
.td-field label{font-size:13px;font-weight:750;color:#334c39;display:block;margin-bottom:7px;line-height:1.35}
.td-input-wrap{display:flex;flex-direction:column;gap:3px;min-width:0}
.td-field input,.td-field select{display:block;width:100%!important;max-width:100%;min-width:0;background:#fff;color:#1b3022;border:1px solid #cbdace;border-radius:9px;padding:11px 12px;min-height:45px;box-shadow:none;outline:none;font:inherit;font-size:15px;line-height:1.4;transition:border-color .15s,box-shadow .15s}
.td-field select{padding-right:16px}
.td-field input:focus,.td-field select:focus{border-color:#2eb34a;box-shadow:0 0 0 3px rgba(9,148,139,.12)}
.td-unit{font-size:11px;font-weight:650;color:#6a7e90;line-height:1.25;margin:1px 2px 0}
.td-actions{display:flex;gap:13px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.td-reset{border:0!important;background:transparent!important;color:#46634d!important;text-decoration:underline!important;font-size:13px!important;cursor:pointer;padding:9px!important;box-shadow:none!important}
.td-output-box{background:#fff;display:flex;flex-direction:column}
.td-output-header{display:flex;align-items:center;gap:9px}
.td-dot{width:9px;height:9px;background:#2eb34a;border-radius:50%;box-shadow:0 0 0 4px rgba(7,165,142,.1)}
.td-results{display:grid;gap:10px}
.td-result{border-radius:12px;background:#f3f9f4;border:1px solid #e2eee5;padding:15px 16px;display:flex;flex-direction:column;gap:4px;min-height:71px}
.td-result span{font-size:12px;color:#526e58;line-height:1.4;font-weight:650}
.td-result strong{font-size:clamp(17px,1.8vw,23px);line-height:1.2;color:#17351f;overflow-wrap:anywhere;font-weight:800;font-variant-numeric:tabular-nums}
.td-result.td-highlight{background:linear-gradient(115deg,#e8f8ec,#f3fcf4);border:1px solid #a7e1b1}
.td-result.td-highlight strong{color:#22873b}
.td-assumption{margin:auto 0 0!important;padding-top:20px;font-size:12px;color:#607363;line-height:1.6}
.td-error{font-size:13px;color:#b22929;line-height:1.45;margin:0 0 12px;font-weight:700}
.td-error:empty{display:none}
.td-graph-box{margin:0 23px 23px}
.td-graph-box h3{font-size:19px!important}
.td-graph-title{font-size:13px;color:#516d56;margin:4px 0 15px!important}
.td-chart{width:100%;max-width:100%;height:210px;display:block}
.td-small{font-size:12px;color:#607363;margin:8px 0 0!important}
.td-editorial{padding:4px 12px 45px;max-width:910px;margin:24px auto 50px;color:#263c4e}
.td-reading-time{display:inline-block;border-left:3px solid #2eb34a;padding-left:10px;margin:6px 0 6px;font-weight:800;font-size:11px;letter-spacing:1.6px;color:#308643}
.td-editorial h2{font-size:clamp(21px,2.35vw,27px)!important;line-height:1.3!important;margin:31px 0 12px!important;color:#22382a!important;font-weight:780!important;letter-spacing:-.35px}
.td-editorial h3{font-size:18px!important;color:#2d4633!important;margin:21px 0 5px!important;font-weight:750!important}
.td-editorial p{font-size:16px!important;line-height:1.83!important;margin:0 0 15px!important;color:#344d3a!important;max-width:100%}
.td-editorial a,.td-catalog a{color:#268e3f;text-underline-offset:3px}
.td-related{background:#f2faf4;border-radius:15px;margin-top:32px;padding:18px 23px;border:1px solid #dce9de}
.td-related h2{margin:2px 0 10px!important;font-size:21px!important}
.td-related ul{margin:0 0 0 20px;padding:0}
.td-related li{margin:7px 0}
.td-catalog h2{font-size:30px!important;margin:20px 0 6px!important}
.td-catalog h3{font-size:21px!important;margin:29px 0 13px!important}
.td-catalog>p{color:#536b59}
.td-catalog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.td-catalog-item{border:1px solid #dfebdf;border-radius:13px;padding:15px;background:#fff}
.td-catalog-item strong{font-size:15px;line-height:1.45;display:block}
.td-catalog-item p{font-size:13px;color:#627363;margin:5px 0 0;line-height:1.55}
.td-catalog-item small{color:#a57435}
@media(max-width:790px){.td-calculator{grid-template-columns:1fr}.td-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.td-hero img{width:34%}.td-hero{padding:24px}}
@media(max-width:540px){.td-topbar{padding:13px 15px}.td-brand{font-size:17px}.td-chip{font-size:10px}.td-hero{padding:27px 19px 24px;min-height:unset}.td-hero h2{font-size:27px!important}.td-hero img{display:none}.td-calculator{padding:12px;gap:12px}.td-form-box,.td-output-box{padding:19px 16px}.td-fields{grid-template-columns:1fr;gap:14px}.td-graph-box{margin:0 12px 13px;padding:19px 12px}.td-editorial{padding:2px 10px 25px}.td-editorial p{font-size:15px!important;line-height:1.75!important}.td-catalog-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.td-field input,.td-field select{transition:none!important}}

@container (max-width:780px){.td-calculator{grid-template-columns:1fr}.td-hero img{width:30%}}
@container (max-width:460px){.td-fields{grid-template-columns:1fr}.td-hero img{display:none}.td-hero h2{font-size:27px!important}.td-calculator{padding:12px}}
@media print{.td-calculator button,.td-reset{display:none!important}.td-shell{box-shadow:none!important}.td-editorial{break-inside:avoid-page}}

/* v1.1 TillDrive palette derives from supplied white/charcoal/#2eb34a brand.
   Intentionally NO repeated logo or wordmark inside the calculator. */
.td-topbar-caption{font-weight:850;color:#243429;font-size:11px;letter-spacing:1.6px;line-height:1.4}
.td-topbar-caption:before{content:"";display:inline-block;width:8px;height:8px;background:#2eb34a;border-radius:50%;margin-right:10px;vertical-align:middle}
.td-chip{background:#eef9f0;border:1px solid #d4ead8;color:#28783b}
.td-hero{background:linear-gradient(112deg,#14241a 0%,#21392a 62%,#2e5035 100%)}
.td-hero:after{background:radial-gradient(circle at 84% 38%,rgba(46,179,74,.19),transparent 49%)}
.td-hero img{mix-blend-mode:normal;border:1px solid rgba(255,255,255,.16)}
.td-form-box,.td-output-box,.td-graph-box{border-color:#dfebdf}
.td-reset:focus-visible,.td-chart circle:focus-visible{outline:3px solid #74cf84;outline-offset:3px}
.td-chart-region{background:#fbfdfb;border:1px solid #e3eee4;border-radius:12px;padding:9px 8px 2px;overflow:hidden}
.td-chart{height:auto;min-height:195px;width:100%;display:block;overflow:visible}
.td-chart-details{margin-top:13px;border-top:1px solid #e4eee5;padding-top:9px;color:#385c40}
.td-chart-details summary{cursor:pointer;font-weight:700;font-size:13px}
.td-chart-table-wrap{overflow:auto;margin-top:9px}
.td-chart-data{width:100%;border-collapse:collapse;font-size:13px;color:#28422e}
.td-chart-data th,.td-chart-data td{padding:7px 10px;border-bottom:1px solid #e2eee5;text-align:left}
.td-chart-data th{background:#eef8f0}
.td-current-row{background:#e6f7e8;font-weight:750}
.td-live-status{color:#287a3c;font-weight:650}
.td-graph-box{max-width:100%}
.td-calculator button{text-transform:none}
@media(max-width:540px){.td-topbar-caption{font-size:10px;letter-spacing:1px}.td-chip{max-width:60%;font-size:10px}.td-chart{min-height:160px}}

/* v1.2.1: FIX the *theme's* two separate top gaps, not the calculator's height.
   Astra boxed-layout pages have space OUTSIDE the white article (#primary) and
   space INSIDE it (.ast-article-single). Do not set padding-top on .ast-container,
   .site-content or .site-main: v1.2.0 accidentally introduced extra space there.
   Scoped to actual calculator pages: the site header, other pages and articles
   are untouched. :has() covers page-builder shortcodes absent from post_content. */
body:is(.td-has-calculator,:has(.td-tool.td-shell)).ast-separate-container #primary{
  margin-top:10px!important;
  padding-top:0!important;
}
body:is(.td-has-calculator,:has(.td-tool.td-shell)).ast-separate-container #primary article.ast-article-single,
body:is(.td-has-calculator,:has(.td-tool.td-shell)).ast-separate-container #primary .ast-article-single{
  padding-top:12px!important;
}
/* Remove margins only from the calculator-containing inner content wrapper. */
body:is(.td-has-calculator,:has(.td-tool.td-shell)) :is(.entry-content,.entry-content-wrap,.wp-block-post-content):has(.td-tool.td-shell){
  margin-top:0!important;
  padding-top:0!important;
}
body:is(.td-has-calculator,:has(.td-tool.td-shell)) .td-tool.td-shell{
  margin-top:0!important;
}
/* GeneratePress, Kadence etc. often put blank space on the article itself. */
body:is(.td-has-calculator,:has(.td-tool.td-shell)):not(.ast-separate-container) .inside-article:has(.td-tool.td-shell){
  padding-top:12px!important;
}
@media(max-width:780px){
  body:is(.td-has-calculator,:has(.td-tool.td-shell)).ast-separate-container #primary{margin-top:6px!important}
  body:is(.td-has-calculator,:has(.td-tool.td-shell)).ast-separate-container #primary .ast-article-single{padding-top:8px!important}
}
.td-show-results{border:1px solid #23903a!important;border-radius:10px!important;background:#2eb34a!important;color:#fff!important;
  box-shadow:0 5px 13px rgba(28,139,51,.17)!important;font-size:15px!important;font-weight:800!important;
  line-height:1.4!important;padding:12px 23px!important;cursor:pointer;min-height:46px;transition:background .16s,transform .16s}
.td-show-results:hover{background:#218b39!important;transform:translateY(-1px)}
.td-show-results:focus-visible{outline:3px solid #92dba0!important;outline-offset:3px}
.td-actions{justify-content:space-between;margin-top:8px}
.td-results[hidden],.td-graph-box[hidden]{display:none!important}
.td-output-box:not(:has(.td-results:not([hidden]))){min-height:160px}
@media(max-width:540px){.td-actions{gap:8px}.td-show-results{flex:1;text-align:center}.td-output-box:not(:has(.td-results:not([hidden]))){min-height:120px}}
@media(prefers-reduced-motion:reduce){.td-show-results{transition:none!important}.td-show-results:hover{transform:none}}
