/* NuTek Filteration Inc. - ROI Calculator styles (plain CSS, no framework)
 * v1.0.4: colours, fonts, buttons, inputs and footer follow nutekfil.com
 * (tokens copied from https://nutekfil.com/assets/style.css).
 */

:root {
  /* nutekfil.com palette */
  --navy: #062b5d;
  --deep: #031c42;
  --blue: #0066bd;
  --sky: #37b8ee;
  --green: #52bc24;
  --green-hover: #78d349;   /* nutekfil.com .primary:hover */
  --ink: #12243c;
  --muted: #4f6275;
  --pale: #eef7fb;
  --line: #dce7ed;
  --card-line: #d7e6ec;     /* nutekfil.com .catalog-card border */
  --input-line: #bdcfdd;    /* nutekfil.com form inputs */
  --panel: #ffffff;
  --bg: #ffffff;
  --footer-bg: #031733;
  --footer-ink: #bdcde0;
  /* calculator-only (not on nutekfil.com) */
  --green-text: #2f7d12;    /* darker green so CO2 figures stay readable on white */
  --green-soft: #eef8e8;
  --warn: #8a5300;
  --warn-soft: #fff4e0;
  --err: #b3261e;
  --err-soft: #fdecea;
  --radius: 5px;

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: 'Manrope', 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.65 var(--font-body);
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.14; margin: 0 0 .6em; color: var(--navy); text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -.045em; }
h2 { font-size: 1.4rem; letter-spacing: -.03em; }
h3 { font-size: 1.02rem; letter-spacing: -.01em; margin-top: 1.4em; }

.wrap { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: #fff; box-shadow: 0 3px 12px #001b3712; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; min-height: 76px; padding: 8px 0; flex-wrap: wrap; }
.brand { color: var(--navy); text-decoration: none; display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1.2rem; letter-spacing: -.02em; }
.brand-logo { width: 48px; height: 48px; display: block; }
/* Top menu: copied from nutekfil.com assets/style.css (v2.0.4) */
.header-inner { flex-wrap: nowrap; }
.nav-links { display: flex; align-items: center; gap: clamp(15px, 2.25vw, 36px); font-weight: 700; font-size: .88rem; color: #29405b; }
.nav-links a { color: inherit; text-decoration: none; white-space: nowrap; }
.nav-links a:hover { color: var(--blue); }
.nav-contact { display: none; }
.nav-cta { background: var(--navy); color: #fff; padding: .75rem 1.1rem; border-radius: 4px; white-space: nowrap; font-weight: 700; font-size: .88rem; text-decoration: none; }
.nav-cta:hover { background: #07528c; }
.menu { display: none; background: none; border: 0; padding: 8px; font-size: 1.7rem; line-height: 1; color: var(--navy); cursor: pointer; }
.nav-dropdown { position: relative; }
.nav-dropdown summary { list-style: none; cursor: pointer; font-weight: 700; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; }
.nav-dropdown[open] summary::after { transform: rotate(225deg); margin-top: 3px; }
.nav-dropdown summary:hover, .nav-dropdown[open] summary { color: var(--blue); }
.nav-dropdown summary:focus-visible { outline: 3px solid #65d649; outline-offset: 5px; }
.dropdown-menu { position: absolute; z-index: 110; top: calc(100% + 20px); right: -20px; min-width: 230px; background: #fff; border: 1px solid var(--line); box-shadow: 0 16px 32px #052b4c24; padding: 9px; border-radius: 5px; display: flex; flex-direction: column; gap: 2px; }
.dropdown-menu a { padding: 10px 12px; border-radius: 3px; }
.dropdown-menu a:hover { background: #eef7fb; }
@media (max-width: 1250px) {
  .site-header { position: relative; }
  .nav-cta { display: none; }
  .menu { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: 0 12px 22px #002d4f25; padding: 20px 24px; flex-direction: column; align-items: start; gap: 17px; font-size: 1rem; max-height: calc(100vh - 80px); overflow-y: auto; }
  .nav-links.open { display: flex; }
  .nav-contact { display: block; }
  .dropdown-menu { position: static; box-shadow: none; border: 0; border-left: 2px solid var(--green); padding: 5px 0 5px 12px; margin-top: 10px; min-width: 0; }
}

/* ---------- hero band (nutekfil.com .hero) ---------- */
.hero {
  background: radial-gradient(circle at 62% 10%, #185d9b 0, transparent 34%),
              linear-gradient(123deg, #052457, #061f47 55%, #052f5a);
  color: #fff;
  padding: 44px 0 64px;
}
.hero h1 { color: #fff; }
.hero-lead { color: #d3e1ef; max-width: 760px; margin: 0; }
.eyebrow { text-transform: uppercase; font-size: .79rem; font-weight: 800; letter-spacing: .18em; color: var(--sky); margin: 0 0 10px; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: -36px; }
.panel { background: var(--panel); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 24px; box-shadow: 0 6px 24px #001b3710; }
.results { position: sticky; top: 92px; border-top: 3px solid var(--green); }
.method, .report { margin-top: 24px; }
.method { background: #f4f9fb; box-shadow: none; }
main { padding-bottom: 48px; }

/* ---------- form ---------- */
fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 18px 0 4px; }
legend, .panel-sub > summary { font-family: var(--font-head); font-weight: 800; color: var(--navy); padding-right: 8px; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.panel-sub { border-top: 1px solid var(--line); padding: 18px 0 4px; }
.panel-sub > summary { cursor: pointer; margin-bottom: 8px; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-size: .8rem; font-family: var(--font-body); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .9rem; font-weight: 700; margin-bottom: 4px; color: var(--ink); }
.input-wrap { display: flex; align-items: stretch; }
input[type=number], input[type=text], input[type=email], input[type=tel], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--ink); padding: 11px 14px; min-height: 48px;
  border: 1px solid var(--input-line); border-radius: 4px; background: #fff;
}
.input-wrap input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.unit { display: flex; align-items: center; padding: 0 12px; background: var(--pale); border: 1px solid var(--input-line); border-left: 0; border-radius: 0 4px 4px 0; font-size: .85rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
input:focus, select:focus, textarea:focus { outline: 3px solid #37b8ee55; outline-offset: 0; border-color: var(--blue); }
summary:focus-visible, .btn:focus-visible, .mobile-bar:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
input.invalid { border-color: var(--err); background: var(--err-soft); }
.currency-field select { max-width: 170px; }
.hint { font-size: .82rem; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }

details.src { font-size: .8rem; color: var(--muted); margin-top: 3px; }
details.src summary { cursor: pointer; width: max-content; padding: 4px 0; }
details.src p { margin: 4px 0 0; padding: 8px 10px; background: var(--pale); border-radius: 4px; line-height: 1.5; }

.derived { font-size: .9rem; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; }

/* buttons (nutekfil.com .btn / .primary) */
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 800; padding: .9rem 1.3rem; min-height: 48px; border-radius: 5px; border: 1px solid #9cb7c9; background: #fff; color: var(--navy); cursor: pointer; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); background: var(--pale); }
.btn.primary { background: var(--green); border-color: var(--green); color: #08283b; }
.btn.primary:hover { background: var(--green-hover); border-color: var(--green-hover); }

/* ---------- results ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--pale); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi-label { font-size: .8rem; color: var(--muted); font-weight: 700; }
.kpi-value { font-family: var(--font-head); font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; color: var(--navy); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.kpi.money { background: var(--deep); }
.kpi.money .kpi-label { color: #bdcde0; }
.kpi.money .kpi-value { color: #fff; }
.kpi.co2 { background: var(--green-soft); border-top: 3px solid var(--green); }
.kpi.co2 .kpi-value { color: var(--green-text); }

.period { margin-top: 14px; font-size: .95rem; }
.period p { margin: 0 0 4px; }
.period ul { margin: 0; padding-left: 20px; }

.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; gap: 8px; font-size: .85rem; }
.bar-track { background: var(--pale); border-radius: 3px; height: 18px; overflow: hidden; }
.bar { display: block; height: 100%; border-radius: 3px; transition: width .25s ease; }
.bar.base { background: #9cb7c9; }
.bar.bypass { background: linear-gradient(90deg, var(--blue), var(--green)); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; }

.breakdown { width: 100%; border-collapse: collapse; font-size: .9rem; }
.breakdown th { text-align: left; font-weight: 400; padding: 7px 0; border-bottom: 1px solid var(--line); }
.breakdown td { text-align: right; padding: 7px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown .neg { color: var(--err); }
.breakdown tr.sub th, .breakdown tr.sub td { font-weight: 700; }
.breakdown tr.total th, .breakdown tr.total td { font-weight: 800; color: var(--navy); border-bottom: 2px solid var(--green); }

.warn { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 4px; font-size: .9rem; }
.notice { padding: 10px 14px; border-radius: 4px; margin: 20px 0 0; position: relative; z-index: 1; }
.notice.ok { background: var(--green-soft); color: var(--green-text); }
.notice.err { background: var(--err-soft); color: var(--err); }

.method ol, .sources { padding-left: 20px; }
.method li { margin-bottom: 6px; }
.small { font-size: .85rem; color: var(--muted); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ---------- footer (nutekfil.com .footer) ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); font-size: .88rem; padding: 32px 0 28px; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }

[hidden] { display: none !important; }

/* ---------- mobile results bar ---------- */
.mobile-bar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .results { position: static; scroll-margin-top: 90px; }
  .site-header { position: relative; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .mobile-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    justify-content: space-around; gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--deep); color: #fff; text-decoration: none;
    border-top: 3px solid var(--green);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .18);
    transition: transform .2s ease;
  }
  .mobile-bar.is-hidden { transform: translateY(110%); }
  .mb-item { display: flex; flex-direction: column; min-width: 0; text-align: center; }
  .mb-label { font-size: .72rem; color: #bdcde0; }
  .mobile-bar strong { font-family: var(--font-head); font-size: 1rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
}
@media (max-width: 480px) {
  .hero { padding: 28px 0 56px; }
  .panel { padding: 18px 14px; }
  .kpis { gap: 8px; }
  .kpi { padding: 10px; }
  .kpi-value { font-size: 1.2rem; }
  .grid2 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 70px 1fr 76px; }
  .brand { font-size: 1.05rem; }
  .brand-logo { width: 40px; height: 40px; }
  .actions .btn { flex: 1 1 auto; }
  .unit { padding: 0 8px; font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bar, .mobile-bar, .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- set-up page, report form, staff download (v2.0.0) ---------- */
.eyebrow-dark { color: var(--blue); }
.hero-slim { padding: 32px 0 56px; }
.login-card { max-width: 520px; margin: -32px auto 0; position: relative; }
.login-card h2 { margin-top: 4px; }
.login-card .notice { margin: 0 0 16px; }
textarea.hash { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; resize: none; background: var(--pale); }
.report { border-top: 3px solid var(--navy); scroll-margin-top: 90px; }
.report fieldset:first-of-type { margin-top: 8px; }
.report textarea { width: 100%; }
.report .captcha { margin: 6px 0 18px; min-height: 78px; border-radius: 4px; }
.report .captcha.needs-tick { outline: 3px solid var(--err); outline-offset: 4px; }
.report .notice.warn { margin: 6px 0 18px; }
.report-actions .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.staff-note { margin-top: 12px; }
.staff-dialog { border: 0; border-top: 4px solid var(--navy); border-radius: 6px; padding: 24px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(6, 43, 93, .3); }
.staff-dialog::backdrop { background: rgba(6, 43, 93, .45); }
.staff-dialog h3 { margin-top: 0; }
.staff-dialog input { width: 100%; }
.staff-dialog .actions { margin-top: 12px; }
@media (max-width: 380px) { .report .captcha { transform: scale(.88); transform-origin: 0 0; } }

/* ---------- print (Print / save PDF button) ---------- */
@media print {
  body { background: #fff; font-size: 12px; padding: 0; }
  .site-header { position: static; box-shadow: none; border-bottom: 3px solid var(--green); }
  .hero { background: #fff; color: var(--ink); padding: 12px 0; }
  .hero h1 { color: var(--navy); }
  .hero-lead { color: var(--muted); }
  .eyebrow { color: var(--blue); }
  .layout { grid-template-columns: 1fr 1fr; margin-top: 0; }
  .actions, .report, details.src, .notice, .mobile-bar, .nav-links, .nav-cta, .menu { display: none !important; }
  .results { position: static; }
  .panel { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .kpi.money { background: #fff; border: 2px solid var(--navy); }
  .kpi.money .kpi-label, .kpi.money .kpi-value { color: var(--navy); }
  .site-footer { background: #fff; color: var(--muted); }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; color: var(--muted); }
}
