/* ============================================================
   EnviroTec Web Tools — shared design system
   .invrt-  = calculator/tool UI (iframe-safe, scoped to .invrt-root)
   .evt-    = platform chrome (landing page)
   Swap the brand hex below for exact EnviroTec values when confirmed.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #f5f4ef;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.invrt-root {
  --invrt-glass: #16463a;
  --invrt-glass-dk: #0e2f27;
  --invrt-steel: #2b3338;
  --invrt-leaf: #5fae3f;
  --invrt-leaf-dk: #3f8a28;
  --invrt-paper: #f5f4ef;
  --invrt-card: #ffffff;
  --invrt-line: #dcdad2;
  --invrt-ink: #1c2522;
  --invrt-muted: #5d6862;
  --invrt-amber: #c8862a;
  --invrt-red: #b4512f;

  background: var(--invrt-paper);
  color: var(--invrt-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: clamp(16px, 4vw, 40px);
  max-width: 1180px;
  margin: 0 auto;
}

.invrt-head { margin-bottom: 28px; }
.invrt-logo { max-height: 56px; width: auto; display: block; margin-bottom: 16px; }
.invrt-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--invrt-leaf-dk); margin: 0 0 10px; }
.invrt-title { font-size: clamp(26px, 4.2vw, 40px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; color: var(--invrt-glass); margin: 0 0 12px; }
.invrt-lede { font-size: clamp(15px, 1.6vw, 17px); color: var(--invrt-muted); max-width: 68ch; margin: 0; }

.invrt-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .invrt-grid { grid-template-columns: 1fr; } }

.invrt-inputs { background: var(--invrt-card); border: 1px solid var(--invrt-line); border-radius: 14px; padding: clamp(18px, 2.4vw, 26px); }
.invrt-group { margin-bottom: 24px; }
.invrt-group:last-child { margin-bottom: 0; }
.invrt-group-h { display: flex; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--invrt-steel); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--invrt-glass); }
.invrt-group-num { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--invrt-leaf-dk); font-size: 12px; font-weight: 700; }

.invrt-field { margin-bottom: 14px; }
.invrt-field:last-child { margin-bottom: 0; }
.invrt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .invrt-row { grid-template-columns: 1fr; } }

.invrt-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--invrt-ink); margin-bottom: 6px; }
.invrt-hint { font-weight: 400; color: var(--invrt-muted); font-size: 12px; }
.invrt-inline-note { font-size: 12px; color: var(--invrt-muted); margin: 6px 0 0; }

.invrt-input-wrap { position: relative; display: flex; align-items: center; }
.invrt-affix { position: absolute; font-size: 14px; color: var(--invrt-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; pointer-events: none; }
.invrt-affix-pre { left: 12px; }
.invrt-affix-post { right: 12px; }

.invrt-input, .invrt-select {
  width: 100%; font-size: 15px; font-family: inherit; color: var(--invrt-ink);
  background: #fbfbf9; border: 1px solid var(--invrt-line); border-radius: 8px;
  padding: 10px 12px; transition: border-color .12s ease, box-shadow .12s ease; font-variant-numeric: tabular-nums;
}
.invrt-input.invrt-has-pre { padding-left: 26px; }
.invrt-input.invrt-has-post { padding-right: 36px; }
.invrt-input:focus, .invrt-select:focus { outline: none; border-color: var(--invrt-leaf); box-shadow: 0 0 0 3px rgba(95,174,63,.18); }
.invrt-input:hover:not(:focus), .invrt-select:hover:not(:focus) { border-color: #c3c0b6; }
.invrt-select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235d6862' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}

.invrt-more { margin-top: 14px; border-top: 1px dashed var(--invrt-line); padding-top: 4px; }
.invrt-more > summary { list-style: none; cursor: pointer; padding: 10px 2px; font-size: 13.5px; font-weight: 600; color: var(--invrt-leaf-dk); display: flex; align-items: center; gap: 8px; }
.invrt-more > summary::-webkit-details-marker { display: none; }
.invrt-more > summary::before { content: "+"; font-family: ui-monospace, monospace; font-weight: 700; width: 18px; height: 18px; line-height: 17px; text-align: center; border: 1.5px solid var(--invrt-leaf-dk); border-radius: 5px; font-size: 13px; }
.invrt-more[open] > summary::before { content: "\2212"; }
.invrt-more-body { padding: 8px 2px 4px; }
.invrt-more-note { font-size: 12.5px; color: var(--invrt-muted); margin: 0 0 14px; }

.invrt-results { position: sticky; top: 20px; background: var(--invrt-glass); color: #eaf2ec; border-radius: 14px; padding: clamp(20px, 2.6vw, 28px); overflow: hidden; }
.invrt-results-h { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9fcaa9; margin: 0 0 4px; }
.invrt-headline { margin: 0 0 14px; }
.invrt-headline-num { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(34px, 6vw, 48px); font-weight: 700; letter-spacing: -.02em; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.invrt-headline-lab { font-size: 14px; color: #9fcaa9; margin-top: 8px; }

.invrt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.invrt-chip { font-size: 11.5px; font-weight: 600; color: #cfe6d3; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 4px 10px; }

.invrt-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.12); border-radius: 10px; overflow: hidden; }
.invrt-metric { background: var(--invrt-glass-dk); padding: 14px 16px; }
.invrt-metric-lab { font-size: 12px; color: #9fcaa9; margin-bottom: 6px; }
.invrt-metric-val { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 21px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.invrt-metric-val.invrt-neg { color: #ff9d7a; }

.invrt-chart-card { margin-top: 18px; background: var(--invrt-glass-dk); border-radius: 10px; padding: 16px 16px 10px; }
.invrt-chart-h { font-size: 12px; color: #9fcaa9; margin: 0 0 10px; letter-spacing: .04em; }
.invrt-chart { width: 100%; height: auto; display: block; }
.invrt-chart-axis { stroke: rgba(255,255,255,.18); stroke-width: 1; }
.invrt-chart-zero { stroke: rgba(255,255,255,.45); stroke-width: 1; stroke-dasharray: 3 3; }
.invrt-chart-line { fill: none; stroke: var(--invrt-leaf); stroke-width: 2.5; }
.invrt-chart-fill { fill: rgba(95,174,63,.16); }
.invrt-chart-be { fill: #fff; stroke: var(--invrt-leaf); stroke-width: 2.5; }
.invrt-chart-txt { fill: #9fcaa9; font-size: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.invrt-chart-be-txt { fill: #fff; font-size: 10px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.invrt-btn { margin-top: 18px; width: 100%; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; color: #eaf2ec; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); border-radius: 8px; padding: 11px 14px; transition: background .12s ease; }
.invrt-btn:hover { background: rgba(255,255,255,.16); }
.invrt-btn:disabled { opacity: .7; cursor: default; }
.invrt-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: invrt-spin .6s linear infinite; vertical-align: -2px; margin-right: 7px; }
@keyframes invrt-spin { to { transform: rotate(360deg); } }
.invrt-share { margin-top: 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.invrt-share-url { flex: 1; min-width: 180px; font-size: 12px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; background: rgba(255,255,255,.08); color: #eaf2ec; }
.invrt-btn-mini { cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; color: #eaf2ec; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 6px; padding: 8px 12px; }
.invrt-btn-mini:hover { background: rgba(255,255,255,.24); }
.invrt-share-msg { font-size: 12px; color: #9fcaa9; }

.invrt-note { margin-top: 16px; font-size: 12px; line-height: 1.5; color: #8fb89a; border-top: 1px solid rgba(255,255,255,.14); padding-top: 14px; }

/* Confidence badges */
.invrt-badge { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; text-align: center; font-size: 10px; font-weight: 700; border-radius: 4px; color: #fff; padding: 0 3px; vertical-align: middle; }
.invrt-conf-high { background: var(--invrt-leaf-dk); }
.invrt-conf-medium { background: var(--invrt-amber); }
.invrt-conf-low { background: var(--invrt-red); }

/* Comparison table */
.invrt-compare { margin-top: 28px; background: var(--invrt-card); border: 1px solid var(--invrt-line); border-radius: 14px; padding: clamp(18px, 2.4vw, 26px); }
.invrt-compare-h { font-size: clamp(18px, 2.4vw, 22px); font-weight: 800; color: var(--invrt-glass); margin: 0 0 6px; }
.invrt-compare-note { font-size: 12.5px; color: var(--invrt-muted); margin: 0 0 16px; }
.invrt-table-wrap { overflow-x: auto; }
.invrt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.invrt-table th, .invrt-table td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--invrt-line); white-space: nowrap; }
.invrt-table th:first-child, .invrt-table td:first-child { text-align: left; }
.invrt-table thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--invrt-muted); border-bottom: 2px solid var(--invrt-glass); }
.invrt-table tbody tr.invrt-current { background: rgba(95,174,63,.10); }
.invrt-table tbody tr.invrt-current td:first-child { font-weight: 700; color: var(--invrt-glass); }
.invrt-table .invrt-neg { color: var(--invrt-red); }

/* Sources */
.invrt-sources { margin-top: 20px; background: var(--invrt-card); border: 1px solid var(--invrt-line); border-radius: 14px; padding: 4px 18px; }
.invrt-sources > summary { list-style: none; cursor: pointer; padding: 14px 2px; font-size: 14px; font-weight: 700; color: var(--invrt-glass); }
.invrt-sources > summary::-webkit-details-marker { display: none; }
.invrt-sources-intro { font-size: 12.5px; color: var(--invrt-muted); line-height: 1.6; margin: 0 0 12px; }
.invrt-sources-list { list-style: none; margin: 0 0 12px; padding: 0; }
.invrt-sources-list li { font-size: 12.5px; color: var(--invrt-ink); padding: 7px 0; border-top: 1px solid var(--invrt-line); }
.invrt-sources-list a { color: var(--invrt-leaf-dk); text-decoration: none; font-weight: 600; }
.invrt-sources-list a:hover { text-decoration: underline; }

.invrt-foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--invrt-line); display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 13px; color: var(--invrt-muted); }
.invrt-foot strong { color: var(--invrt-glass); }
.invrt-foot a { color: var(--invrt-leaf-dk); text-decoration: none; font-weight: 600; }
.invrt-foot a:hover { text-decoration: underline; }

/* Finance card (dark results panel) */
.invrt-fin-card { margin-top: 18px; background: var(--invrt-glass-dk); border-radius: 10px; padding: 16px; }
.invrt-fin-card .invrt-metrics { margin-top: 8px; }

/* Lead capture */
.invrt-lead { margin-top: 20px; background: var(--invrt-card); border: 1px solid var(--invrt-line); border-radius: 14px; padding: clamp(18px, 2.4vw, 26px); max-width: 640px; }
.invrt-lead-form { margin-top: 6px; }
.invrt-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--invrt-ink); margin: 10px 0; line-height: 1.4; cursor: pointer; }
.invrt-consent input { margin-top: 3px; flex: 0 0 auto; }
.invrt-btn-solid { background: var(--invrt-leaf-dk); color: #fff; border: none; }
.invrt-btn-solid:hover { background: var(--invrt-glass); }
.invrt-lead-status { font-size: 13px; font-weight: 600; color: var(--invrt-leaf-dk); margin: 10px 0 0; min-height: 18px; }
.invrt-lead-privacy { font-size: 11.5px; color: var(--invrt-muted); margin: 8px 0 0; }

@media (prefers-reduced-motion: reduce) { .invrt-root * { transition: none !important; } }

/* ---------- Platform landing ---------- */
.evt-wrap { max-width: 1180px; margin: 0 auto; padding: clamp(20px, 5vw, 56px); color: #1c2522; }
.evt-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #3f8a28; margin: 0 0 10px; }
.evt-title { font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -.02em; color: #16463a; margin: 0 0 10px; }
.evt-lede { font-size: clamp(15px, 1.6vw, 17px); color: #5d6862; max-width: 60ch; margin: 0 0 32px; }
.evt-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.evt-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #dcdad2; border-radius: 14px; padding: 22px; transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease; }
.evt-card:hover { border-color: #5fae3f; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(22,70,58,.08); }
.evt-card-icon { font-size: 26px; margin-bottom: 12px; }
.evt-card-title { font-size: 18px; font-weight: 700; color: #16463a; margin: 0 0 6px; }
.evt-card-desc { font-size: 13.5px; color: #5d6862; margin: 0; }
.evt-foot { margin-top: 40px; font-size: 13px; color: #5d6862; }
.evt-foot a { color: #3f8a28; font-weight: 600; text-decoration: none; }
