:root {
  --forest-900: #0f3527;
  --forest-800: #143f2f;
  --forest-700: #1d5c45;
  --forest-600: #26704f;
  --forest-100: #e3eee8;
  --forest-50: #f1f6f3;
  --slate-900: #1b232b;
  --slate-700: #3b4753;
  --slate-600: #52606d;
  --slate-500: #6b7884;
  --slate-300: #c5ccd3;
  --slate-200: #dfe4e8;
  --slate-100: #eef1f3;
  --bg: #f4f6f5;
  --card: #ffffff;
  --accent: #c9a24a;
  --accent-ink: #1b232b;
  --danger: #a2372a;
  --s1: #1d5c45; --s2: #4b7a9c; --s3: #b7853b;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 26, .06), 0 4px 16px rgba(16, 32, 26, .05);
  --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--slate-900); background: var(--bg); font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, h4 { margin: 0; }
.mono { font-family: var(--mono); }
.small { font-size: 11px; }
.muted { color: var(--slate-500); }
.logo{font-weight:800;font-size:1.125rem;display:flex;align-items:center;gap:8px}
 .mark{background:#fff;color:#134e35;width:30px;height:30px;border-radius:7px;display:flex;align-items:center;justify-content:center}
 .logo span{color:#196646}
 .w{max-width:1060px;margin:0 auto;padding:10 20px}
.nav{height:64px;display:flex;align-items:center;justify-content:space-between}

/* Shared layout & bold styling for Home link */
a.custom-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700; /* Use 700 (bold), 800 (extra-bold), or 900 (black) */
  font-size: 1.125rem;
  text-decoration: none;
}

/* Default and visited link colors */
a.custom-link:link,
a.custom-link:visited {
  color: #ffffff;
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:focus-visible { outline: 3px solid rgba(201, 162, 74, .55); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--forest-700); color: #fff; }
.btn-primary:hover { background: var(--forest-800); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #b98f35; }
.btn-outline { background: #fff; border-color: var(--slate-300); color: var(--slate-900); }
.btn-outline:hover { border-color: var(--forest-700); color: var(--forest-700); }
.btn-ghost-light { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #e8f0ec; }
.btn-ghost-light:hover { background: rgba(255,255,255,.14); }
.btn-ghost-light[aria-pressed="true"] { background: #fff; color: var(--forest-800); border-color: #fff; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 28px; background: var(--forest-900); color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: #a9c2b6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lbl-back { display: none; }
.lbl-short { display: none; }
body.view-report .lbl-preview { display: none; }
body.view-report .lbl-back { display: inline; }

/* ---------- Builder layout ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; max-width: 1240px; margin: 0 auto; padding: 32px 28px 64px; }
body.view-report .builder { display: none; }
.eyebrow { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--forest-600); }
.intro h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -.01em; margin: 6px 0 8px; color: var(--forest-900); }
.intro-text { margin: 0 0 22px; max-width: 62ch; color: var(--slate-600); }

.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
.step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--slate-200); background: #fff; border-radius: 8px; cursor: pointer; text-align: left; min-width: 0; }
.step-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--slate-100); color: var(--slate-600); font-size: 12px; font-weight: 700; flex: none; }
.step-t { font-size: 13px; font-weight: 600; color: var(--slate-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.is-active { border-color: var(--forest-700); box-shadow: inset 0 -3px 0 var(--forest-700); }
.step.is-active .step-n { background: var(--forest-700); color: #fff; }
.step.is-active .step-t { color: var(--forest-900); }
.step.is-done .step-n { background: var(--forest-100); color: var(--forest-700); }

.panel { border: 1px solid var(--slate-200); background: var(--card); border-radius: var(--radius); padding: 24px; margin: 0; box-shadow: var(--shadow); min-width: 0; }
.panel legend { float: left; width: 100%; padding: 0; margin-bottom: 16px; font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--forest-900); }
.panel legend + * { clear: both; }
.legend-n { display: block; font-family: var(--font); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-500); margin-bottom: 2px; }
.panel-note { margin: 0 0 16px; color: var(--slate-600); font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbl { font-size: 13.5px; font-weight: 600; color: var(--slate-900); }
.sublbl { font-size: 12.5px; font-weight: 500; color: var(--slate-600); }
.opt { font-style: normal; font-weight: 500; font-size: 12px; color: var(--slate-500); margin-left: 4px; }
.hint { font-size: 12.5px; color: var(--slate-500); margin: 0; }
input[type="text"], input[type="number"], select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--slate-300); border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--forest-700); box-shadow: 0 0 0 3px rgba(29, 92, 69, .15); }
.affix { display: flex; align-items: stretch; border: 1px solid var(--slate-300); border-radius: 8px; background: #fff; overflow: hidden; }
.affix:focus-within { border-color: var(--forest-700); box-shadow: 0 0 0 3px rgba(29, 92, 69, .15); }
.affix input { border: 0; border-radius: 0; box-shadow: none !important; min-width: 0; }
.affix .pre, .affix .post { display: flex; align-items: center; padding: 0 12px; background: var(--slate-100); color: var(--slate-600); font-size: 12.5px; white-space: nowrap; }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input { flex: 1; accent-color: var(--forest-700); }
.range-row output { min-width: 52px; text-align: right; font-weight: 700; color: var(--forest-700); font-size: 18px; }
.commute-box { padding: 16px; border: 1px dashed var(--slate-300); border-radius: 8px; background: var(--forest-50); }
.commute-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.grid-2.inner { gap: 12px; }
#commuteCalc { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--forest-700); }
.subsection { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--slate-200); }
.subsection h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--slate-200); border-radius: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--forest-700); flex: none; }
.check:has(input:checked) { border-color: var(--forest-700); background: var(--forest-50); }
.templates { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--slate-300); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; }
.chip:hover { border-color: var(--forest-700); color: var(--forest-700); background: var(--forest-50); }

.form-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 12px; }
.form-nav-r { display: flex; align-items: center; gap: 14px; }
.step-count { font-size: 13px; color: var(--slate-500); }

/* ---------- Sidebar ---------- */
.summary { position: relative; }
.sum-card { position: sticky; top: 84px; background: var(--card); border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.sum-head { display: flex; justify-content: space-between; align-items: center; }
.sum-year { font-size: 12px; font-weight: 600; color: var(--slate-600); background: var(--slate-100); padding: 2px 8px; border-radius: 999px; }
.sum-total { display: flex; align-items: flex-end; gap: 10px; margin-top: 10px; }
.sum-total-v { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--forest-900); }
.sum-total-u { font-size: 11.5px; color: var(--slate-500); line-height: 1.25; padding-bottom: 3px; }
.sum-market { font-size: 13px; color: var(--slate-600); margin-top: 6px; }
.sum-scopes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0; }
.ss { padding: 8px 10px; border-radius: 8px; background: var(--slate-100); border-left: 3px solid; }
.ss.s1 { border-color: var(--s1); } .ss.s2 { border-color: var(--s2); } .ss.s3 { border-color: var(--s3); }
.ss-k { display: block; font-size: 11px; color: var(--slate-600); white-space: nowrap; }
.ss-v { display: block; font-weight: 700; font-size: 16px; }
.chart-block { border-top: 1px solid var(--slate-200); padding-top: 14px; margin-top: 4px; margin-bottom: 14px; }
.chart-block h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-600); margin-bottom: 10px; }
.sum-int { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.sum-int > div { padding: 10px; background: var(--forest-50); border-radius: 8px; }
.sum-int .k { display: block; font-size: 11px; color: var(--slate-600); }
.sum-int .v { display: block; font-size: 18px; font-weight: 700; color: var(--forest-800); }

/* donut + hotspots (shared by sidebar + report) */
.donut { display: flex; align-items: center; gap: 16px; }
.donut svg { flex: none; }
.donut-v { font-family: var(--font); font-size: 5.6px; font-weight: 700; fill: var(--slate-900); }
.donut-u { font-family: var(--font); font-size: 3px; fill: var(--slate-500); }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: grid; gap: 6px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 8px; font-size: 12.5px; }
.legend .sw { width: 10px; height: 10px; border-radius: 2px; }
.legend .lk { color: var(--slate-700); white-space: nowrap; }
.legend .lv { font-weight: 600; }
.legend .lp { color: var(--slate-500); min-width: 40px; text-align: right; }
.hot { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hot-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.hot-k { color: var(--slate-700); }
.hot-v { font-weight: 600; white-space: nowrap; }
.hot-bar { height: 7px; background: var(--slate-100); border-radius: 4px; overflow: hidden; margin-top: 3px; }
.hot-bar span { display: block; height: 100%; border-radius: 4px; }
.empty { font-size: 13px; color: var(--slate-500); margin: 0; }

/* ---------- Report view ---------- */
.report-view { display: none; }
body.view-report .report-view { display: block; }
.report-toolbar { position: sticky; top: 64px; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 28px; background: #fff; border-bottom: 1px solid var(--slate-200); box-shadow: 0 2px 10px rgba(16,32,26,.04); }
.rt-left { display: flex; align-items: center; gap: 12px; min-width: 260px; flex: 1 1 0; }
.rt-msg { font-size: 13px; color: var(--slate-600); }
.rt-right { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-locked { background: #fbf2de; color: #8a6414; }
.st-sample { background: #e6eef5; color: #2f5b7c; }
.st-licensed { background: var(--forest-100); color: var(--forest-700); }
.key-inline { display: flex; flex-direction: column; gap: 3px; }
.key-lbl { font-size: 11.5px; font-weight: 600; color: var(--slate-600); }
.key-row { display: flex; gap: 6px; }
.key-input { font-family: var(--mono) !important; text-transform: uppercase; letter-spacing: .04em; min-height: 34px !important; padding: 6px 10px !important; width: 180px; font-size: 13px; }
.key-input-lg { width: 100%; min-height: 44px !important; font-size: 15px; }
.key-input.shake { animation: shake .35s; border-color: var(--danger); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.key-msg { margin: 6px 0 0; font-size: 12.5px; min-height: 1em; }
.key-msg.ok { color: var(--forest-700); }
.key-msg.err { color: var(--danger); }
#btnDownload.is-locked { background: var(--slate-200); color: var(--slate-600); }
#btnDownload.is-locked::after { content: ''; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center/contain no-repeat; }
body.licensed .lock-only, body.mode-sample .lock-only { display: none !important; }
.licensed-only { display: none; }
body.licensed .licensed-only { display: block; }

.sheets { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 32px 16px 80px; }

/* Letter-size sheet */
.sheet { position: relative; width: 8.5in; min-height: 11in; max-width: 100%; background: #fff; padding: 0.45in 0.55in 0.7in; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 12px 40px rgba(16,32,26,.10); border-radius: 2px; overflow: hidden; font-size: 10.5px; line-height: 1.45; color: var(--slate-900); }
.sample-badge { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 6; background: #2f5b7c; color: #fff; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; padding: 4px 14px; border-radius: 0 0 6px 6px; }

.rep-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--forest-700); }
.rep-head-sm + .locked-zone { margin-top: 10px; }
.rep-head-sm { padding-bottom: 8px; border-bottom-width: 1px; border-color: var(--slate-300); }
.rep-brand { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--forest-700); }
.rep-mark { width: 18px; height: 18px; color: var(--forest-700); }
.ghg-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1.5px solid var(--forest-700); border-radius: 999px; font-size: 9.5px; font-weight: 700; color: var(--forest-700); white-space: nowrap; }
.ghg-badge .ico { width: 13px; height: 13px; }
.rep-title { margin: 18px 0 12px; }
.rep-kicker { margin: 0; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-600); }
.rep-company { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.15; color: var(--forest-900); margin-top: 2px; }
.rep-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0 0 18px; border: 1px solid var(--slate-200); border-radius: 6px; }
.rep-meta > div { padding: 7px 10px; border-right: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); }
.rep-meta > div:nth-child(4n) { border-right: 0; }
.rep-meta > div:nth-last-child(-n+4) { border-bottom: 0; }
.rep-meta dt { font-size: 8.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--slate-500); font-weight: 600; }
.rep-meta dd { margin: 1px 0 0; font-weight: 600; font-size: 10.5px; }

.rep-sec { margin-bottom: 14px; position: relative; }
.rep-h { display: flex; align-items: baseline; gap: 8px; font-family: var(--serif); font-size: 14.5px; font-weight: 600; color: var(--forest-900); margin-bottom: 9px; }
.rep-h span { font-family: var(--mono); font-size: 9.5px; font-weight: 500; color: var(--forest-600); }

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.kpis .kpi { grid-column: span 2; }
.kpis .kpi-hero, .kpis .kpi-hero2, .kpis .kpi:nth-child(6), .kpis .kpi:nth-child(7) { grid-column: span 3; }
.kpi { border: 1px solid var(--slate-200); border-radius: 6px; padding: 9px 10px; display: flex; flex-direction: column; gap: 1px; }
.kpi-k { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--slate-600); }
.kpi-v { font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.kpi-v small { font-size: 12px; font-weight: 600; color: var(--slate-600); }
.kpi-u { font-size: 9px; color: var(--slate-500); }
.kpi-hero { background: var(--forest-800); border-color: var(--forest-800); color: #fff; }
.kpi-hero .kpi-k, .kpi-hero .kpi-u { color: #b7d0c4; }
.kpi-hero .kpi-v { font-size: 26px; }
.kpi-hero2 { background: var(--forest-50); border-color: var(--forest-100); }
.kpi-hero2 .kpi-v { font-size: 26px; color: var(--forest-800); }
.kpi.k1 { border-top: 3px solid var(--s1); } .kpi.k2 { border-top: 3px solid var(--s2); } .kpi.k3 { border-top: 3px solid var(--s3); }

.rep-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rep-chart { border: 1px solid var(--slate-200); border-radius: 6px; padding: 12px 14px; }
.rep-chart .legend li, .rep-chart .hot-top { font-size: 10.5px; }
.rep-chart .hot { gap: 6px; }

.gov { display: grid; grid-template-columns: 1fr 1.35fr; gap: 14px; }
.gov-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.gov-list li { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--slate-200); border-radius: 5px; }
.gov-list .ico { width: 13px; height: 13px; }
.gov-list li.y .ico { color: var(--forest-700); }
.gov-list li.n .ico { color: var(--slate-300); }
.gov-list em { font-style: normal; font-size: 9px; color: var(--slate-500); }
.gov-list li.y em { color: var(--forest-700); font-weight: 600; }
.gov-target { background: var(--forest-50); border-left: 3px solid var(--forest-700); padding: 10px 12px; border-radius: 0 6px 6px 0; }
.gov-k { font-size: 8.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--forest-700); }
.gov-target p { margin: 4px 0 0; }

.sheet-foot { position: absolute; left: 0.55in; right: 0.55in; bottom: 0.28in; display: flex; justify-content: space-between; gap: 10px; padding-top: 7px; border-top: 1px solid var(--slate-200); font-size: 8.5px; color: var(--slate-500); }

/* Inventory table */
.inv { width: 100%; border-collapse: collapse; font-size: 9.2px; table-layout: fixed; }
.inv col.c-src { width: 27%; } .inv col.c-act { width: 11%; } .inv col.c-unit { width: 9%; } .inv col.c-ef { width: 35%; } .inv col.c-t { width: 9.5%; } .inv col.c-p { width: 8.5%; }
.inv th { text-align: left; font-size: 8.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-600); font-weight: 700; padding: 6px 6px; border-bottom: 1.5px solid var(--slate-900); }
.inv td { padding: 2.5px 6px; border-bottom: 1px solid var(--slate-100); vertical-align: top; }
.inv .num { text-align: right; white-space: nowrap; }
.inv .unit { color: var(--slate-600); white-space: nowrap; }
.inv .src { font-weight: 500; }
.inv .cat { display: inline-block; font-size: 8px; padding: 0 4px; border-radius: 3px; background: var(--slate-100); color: var(--slate-600); font-weight: 600; }
.inv .grp td { padding-top: 4px; font-weight: 700; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-700); background: var(--slate-100); border-bottom: 0; }
.sc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.inv .ef-v { font-family: var(--mono); font-weight: 500; }
.inv .ef-u { color: var(--slate-500); font-size: 8.5px; }
.inv .ef-c { display: block; font-size: 7.6px; color: var(--slate-500); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv .t { font-weight: 600; }
.inv .memo td { color: var(--slate-600); font-style: italic; }
.inv .memo .ef-v { font-style: normal; }
.inv .subtotal td { font-weight: 700; border-bottom: 1px solid var(--slate-300); background: #fafbfb; }
.inv tfoot td { font-weight: 700; padding: 4px 6px; border-top: 1.5px solid var(--slate-900); background: var(--forest-50); }
.inv tfoot .mb td { border-top: 0; background: #fff; color: var(--slate-700); }

.method p, .attest p { margin: 0 0 5px; text-align: justify; hyphens: auto; }
.method { font-size: 9.1px; line-height: 1.4; color: var(--slate-700); }
.attest { font-size: 9.6px; }
.sig-grid { display: grid; grid-template-columns: 1.5fr 1.2fr 1.2fr .8fr; gap: 10px 18px; margin-top: 12px; }
.sig { display: flex; flex-direction: column; gap: 3px; }
.sig-line { height: 20px; border-bottom: 1px solid var(--slate-900); }
.sig-k { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500); }

/* ---------- Locked preview (screen) ---------- */
.lockable { transition: filter .25s; }
body.screen-locked .locked-zone .lockable { filter: blur(5px); user-select: none; -webkit-user-select: none; pointer-events: none; }
.locked-zone { position: relative; }
.lock-overlay { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 20px; pointer-events: none; }
.lock-card { pointer-events: auto; width: min(380px, 100%); background: #fff; border: 1px solid var(--slate-200); border-radius: 12px; padding: 22px; box-shadow: 0 18px 50px rgba(15, 53, 39, .22), 0 2px 6px rgba(0,0,0,.06); text-align: center; font-size: 13px; }
.lock-ico { width: 42px; height: 42px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%; background: #fbf2de; color: #8a6414; }
.lock-card h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--forest-900); margin-bottom: 6px; }
.lock-card p { margin: 0 0 14px; color: var(--slate-600); line-height: 1.5; }
.lock-card .key-lbl { display: block; text-align: left; margin: 14px 0 4px; }
.lock-card .key-row .key-input { flex: 1; width: auto; }
.lock-card .key-msg { text-align: left; }

/* Watermark layer */
.watermark { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; display: none; }
.wm-inner { position: absolute; top: 50%; left: 50%; width: 220%; transform: translate(-50%, -50%) rotate(-32deg); display: flex; flex-direction: column; gap: 46px; }
.wm-row { white-space: nowrap; font-family: var(--font); font-weight: 800; font-size: 22px; letter-spacing: .08em; color: rgba(162, 55, 42, .055); text-align: center; }
body.screen-locked .watermark { display: block; }

/* ---------- Modal ---------- */
body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15, 30, 24, .55); display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal { position: relative; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 14px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--forest-900); margin: 4px 0 6px; }
.modal-lede { margin: 0 0 20px; color: var(--slate-600); }
.modal-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; background: var(--slate-100); border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.modal-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.modal-buy { border: 1px solid var(--slate-200); border-radius: 10px; padding: 18px; }
.price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.price-v { font-size: 34px; font-weight: 700; color: var(--forest-900); letter-spacing: -.02em; }
.price-u { font-size: 13px; color: var(--slate-500); }
.incl { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 9px; font-size: 13.5px; }
.incl li { display: flex; gap: 10px; align-items: flex-start; }
.ico.ok { color: var(--forest-700); margin-top: 2px; }
.fine { margin: 10px 0 0; font-size: 12px; color: var(--slate-500); text-align: center; }
.modal-key { background: var(--forest-50); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.modal-key .key-lbl { font-size: 14px; color: var(--slate-900); }
.key-active { border-top: 1px solid var(--forest-100); padding-top: 10px; font-size: 13px; }
.key-active p { margin: 0 0 8px; }
.key-active code { font-family: var(--mono); background: #fff; padding: 2px 6px; border-radius: 4px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 120; background: var(--slate-900); color: #fff; padding: 11px 18px; border-radius: 8px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .builder { grid-template-columns: 1fr; }
  .sum-card { position: static; }
  .topbar-actions .lbl-long { display: none; }
  .topbar-actions .lbl-short { display: inline; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .topbar { padding: 10px 14px; flex-wrap: wrap; }
  .brand-sub { display: none; }
  .topbar-actions { width: 100%; justify-content: stretch; }
  .topbar-actions .btn { flex: 1; padding: 0 10px; }
  .topbar-actions #btnPreview { flex: 1 0 100%; }
  .builder { padding: 20px 14px 48px; }
  .stepper { grid-template-columns: repeat(4, 1fr); }
  .step { flex-direction: column; gap: 4px; padding: 8px 4px; text-align: center; }
  .step-t { font-size: 10.5px; white-space: normal; line-height: 1.2; }
  .panel { padding: 18px 16px; }
  .grid-2, .checks { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .report-toolbar { position: static; padding: 12px 14px; }
  .rt-right { width: 100%; }
  .rt-right .btn { flex: 1; }
  .key-inline, .key-row, .key-input { width: 100%; }
  .key-row .key-input { flex: 1; }
  .sheets { padding: 16px 8px 60px; gap: 16px; }
  .sheet { padding: 22px 16px 56px; min-height: 0; }
  .sheet-foot { left: 16px; right: 16px; bottom: 14px; flex-wrap: wrap; }
  .sheet-foot span:nth-child(2) { display: none; }
  .rep-head { flex-wrap: wrap; }
  .rep-meta { grid-template-columns: 1fr 1fr; }
  .rep-meta > div { border-right: 1px solid var(--slate-200) !important; border-bottom: 1px solid var(--slate-200) !important; }
  .rep-meta > div:nth-child(2n) { border-right: 0 !important; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi { grid-column: span 1 !important; }
  .kpis .kpi-hero, .kpis .kpi-hero2 { grid-column: span 2 !important; }
  .rep-charts, .gov, .modal-grid, .sig-grid { grid-template-columns: 1fr; }
  .donut { flex-direction: column; align-items: stretch; }
  .donut svg { align-self: center; }
  .inv { display: block; overflow-x: auto; white-space: nowrap; }
  .modal { padding: 22px 18px; }
}

/* ===================================================================
   PRINT — only the 2-page report is ever printed.
   Locked or Sample → repeating diagonal watermark + audit table blurred.
   Licensed custom report → clean, button-free, watermark-free PDF.
   =================================================================== */
@media print {
  @page { size: letter; margin: 0; }
  html, body { background: #fff !important; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print, .topbar, .builder, .report-toolbar, .modal-backdrop, .toast, .lock-overlay, button, .btn, input, select, textarea { display: none !important; }
  .report-view { display: block !important; }
  .sheets { display: block; padding: 0; gap: 0; }
  .sheet { width: 8.5in; height: 11in; min-height: 11in; max-width: none; margin: 0; box-shadow: none; border-radius: 0; page-break-after: always; break-after: page; overflow: hidden; }
  .sheet:last-child { page-break-after: auto; break-after: auto; }

  /* Default (licensed): nothing blurred, no watermark */
  .lockable { filter: none !important; }
  .watermark { display: none !important; }

  /* Protected print (locked preview OR sample mode) */
  body.print-protected .watermark { display: block !important; z-index: 20; }
  body.print-protected .wm-row { color: rgba(162, 55, 42, .17) !important; font-size: 24px; font-weight: 900; }
  body.print-protected .locked-zone .lockable { filter: blur(5px) !important; }
  body.print-protected .sample-badge { display: block; }
  body:not(.print-protected) .sample-badge { display: none; }
}

/* Sidebar donut: stack chart above legend so the legend never overflows the card */
.summary .donut { flex-direction: column; align-items: stretch; gap: 12px; }
.summary .donut svg { align-self: center; }
