/* Card layer and typography aligned with the main website. */
body.calc-body { font-feature-settings: "zero" 0; }
.calc-body .mono,
.calc-body .eyebrow,
.calc-body .pv-status strong,
.calc-body .calc-frame code,
.calc-body .calc-frame svg text,
.calc-body .step-head .step-subtitle-important::before {
  font-family: inherit;
  font-feature-settings: "zero" 0;
}
.calc-body .mono { font-variant-numeric: lining-nums tabular-nums; }
.calc-body .eyebrow { font-weight: 600; letter-spacing: .055em; }
.calc-body .step-head .step-subtitle-important::before { letter-spacing: .055em; }

@media screen {
  body.calc-body { background: #f1f3f0; color: #202225; font-size: 1rem; }
  .calc-root { min-height: 100dvh; }
  .calc-topbar { padding-top: env(safe-area-inset-top); }
  .calc-topbar-inner { height: auto; min-height: 68px; padding-block: 8px; gap: 8px; flex-wrap: wrap; }
  .calc-steps { min-width: 0; flex: 1; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
  #calc-stepof { white-space: nowrap; }
  .calc-back-link { min-height: 2.75rem; font-size: .8125rem; }
  .calc-dots { flex-shrink: 0; }
  .dot { width: 2.75rem; height: 2.75rem; }
  .calc-stage { padding-top: 44px; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); padding-bottom: max(42px, env(safe-area-inset-bottom)); }
  .calc-frame { max-width: 740px; }
  .calc-frame[data-step="4"] { max-width: 800px; }
  .calc-frame.wide { max-width: 1120px; }

  .calc-frame:not(.wide) .fcard,
  .calc-frame.wide .fcard {
    border: 1px solid #dfe3df;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(25, 31, 27, .045);
    backdrop-filter: none;
  }
  .calc-frame:not(.wide) .card-p8,
  .calc-frame:not(.wide) .card-p7 { padding: clamp(20px, 4vw, 30px); }
  .calc-frame:not(.wide) .card-p6 { padding: 22px; }
  .step-head { margin-bottom: 24px; }
  .step-head .eyebrow,
  .calc-frame.wide .res-head .eyebrow { color: #a7470d; }
  .calc-intro h1 { font-size: clamp(2rem, 5vw + .5rem, 3.75rem); overflow-wrap: anywhere; }
  .calc-intro .p1 { font-size: 1rem; }
  .calc-intro .btn { font-size: .9375rem; }
  .step-head h1 { color: #202225; font-size: clamp(1.5rem, 3vw + .5rem, 2.25rem); letter-spacing: -.03em; overflow-wrap: anywhere; }
  .step-head p { max-width: 66ch; color: #5d645f; font-size: .90625rem; line-height: 1.55; }
  .calc-body .eyebrow { font-size: .6875rem; }
  .step-head .step-subtitle-important::before { font-size: .625rem; }
  .calc-frame, .fcard, .calc-nav, .res-col, .pv-evidence { min-width: 0; }
  .fcard, .pv-details, .import-mapping { overflow-wrap: anywhere; }

  .numfield { min-width: 0; container-type: inline-size; }
  .numfield label { color: #454b47; font-size: .8125rem; line-height: 1.5; font-weight: 500; margin-bottom: 8px; }
  .fin { min-width: 0; min-height: 3.25rem; font-size: 1rem; border-color: #cbd1cc; border-radius: 11px; background: #f9faf8; color: #202225; }
  .numfield .fin { padding-right: 5.5rem; }
  .numfield .unit { color: #555d57; font-size: .75rem; }
  select.fin { padding-right: 38px; }
  @container (max-width: 14rem) {
    .numfield .fin { padding-right: 12px; }
    .numfield .unit { position: static; display: block; transform: none; padding-top: 4px; text-align: right; }
  }
  .fin:focus,
  .fin:focus-visible { border-color: #bd510c; box-shadow: 0 0 0 3px rgba(189, 81, 12, .15); }
  .fin:focus-visible,
  .btn:focus-visible,
  .ocard:focus-visible,
  .dso-btn:focus-visible,
  .pv-details summary:focus-visible { outline: 2px solid #bd510c; outline-offset: 3px; }

  .btn { min-width: 0; max-width: 100%; min-height: 2.875rem; font-size: .90625rem; border-radius: 11px; justify-content: center; text-align: center; white-space: normal; overflow-wrap: anywhere; transition: background-color .16s, border-color .16s, box-shadow .16s; }
  .btn svg { flex-shrink: 0; }
  .calc-nav { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .calc-nav .btn:last-child { justify-self: end; }
  .btn-primary { background: #bd510c; color: #fff; box-shadow: 0 2px 5px rgba(88, 39, 12, .16); }
  .btn-primary:hover { background: #a94709; filter: none; transform: none; box-shadow: 0 3px 8px rgba(88, 39, 12, .18); }
  .btn-ghost { border-color: #d6dbd7; background: #fff; color: #454b47; }
  .btn-ghost:hover { background: #f7f8f7; border-color: #aeb6b0; color: #202225; }

  .bigslider-val { flex-wrap: wrap; margin-bottom: 15px; }
  .bigslider-val .bignum { min-width: 0; max-width: 100%; color: #202225; font-family: inherit; font-size: clamp(1.75rem, 8vw + .75rem, 3.75rem); font-weight: 650; letter-spacing: -.055em; }
  .bigslider-val .unit { font-size: .875rem; white-space: nowrap; }
  .bignum:focus-visible { outline: 2px solid #bd510c; outline-offset: 4px; border-radius: 5px; }
  .bigslider-alt { margin-top: -10px; color: #666e68; font-size: .78125rem; }
  /* Keep the thin visible track inside a comfortable touch target. */
  .frng { height: 2.75rem; padding-block: calc((2.75rem - .4375rem) / 2); border-radius: 0; background-clip: content-box !important; }
  .frng::-webkit-slider-runnable-track { height: .4375rem; border-radius: 99px; }
  .frng::-moz-range-track { height: .4375rem; border-radius: 99px; }
  .frng:focus-visible { outline: 2px solid #bd510c; outline-offset: 5px; }
  .frng::-webkit-slider-thumb { width: 1.5rem; height: 1.5rem; margin-top: calc((.4375rem - 1.5rem) / 2); border-color: #bd510c; }
  .frng::-moz-range-thumb { width: 1.5rem; height: 1.5rem; border-color: #bd510c; }
  .grid-2,
  .grid-2-3 { gap: 12px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @media screen and (min-width: 640px) {
    .grid-2-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  .ocard {
    position: relative;
    min-height: 68px;
    border-color: #d9ded9;
    border-radius: 13px;
    background: #fff;
    color: #202225;
    transition: border-color .16s, background-color .16s, box-shadow .16s;
  }
  .ocard:hover { border-color: #aeb6b0; transform: none; box-shadow: none; }
  .optcard-val { font-size: 1rem; letter-spacing: -.015em; line-height: 1.2; }
  .optcard-lbl { font-size: .75rem; line-height: 1.4; }
  .ocard-on,
  .ocard-on:hover {
    border: 1px solid #bd510c;
    background: #fff7f0;
    color: #202225;
    box-shadow: inset 0 0 0 1px #bd510c, 0 0 0 2px rgba(189, 81, 12, .08);
  }
  .ocard-on .optcard-lbl,
  .ocard-on .mono,
  .ocard-on .zone-yield { color: #9f430b !important; }
  .dso-btn { min-width: 0; min-height: 4rem; border-color: #d9ded9; border-radius: 12px; background: #fff; }
  .dso-btn .dso-abbr { font-size: .875rem; }
  .dso-btn .dso-name { font-size: .6875rem; }
  .dso-btn:hover { border-color: #aeb6b0; }
  .dso-on,
  .dso-on:hover { border: 1px solid #bd510c; background: #fff7f0; box-shadow: inset 0 0 0 1px #bd510c, 0 0 0 2px rgba(189,81,12,.08); }
  .dso-on .dso-abbr,
  .dso-on .dso-name { color: #883b0d; }

  .calc-frame[data-step="1"] .fcard { min-width: 0; }
  .calc-frame[data-step="1"] .card-p6 { background: #fff; }
  .calc-frame[data-step="1"] .vsd-p,
  .calc-frame[data-step="1"] .note-tiny,
  .adjust-note,
  .note-tiny,
  .prop-stat .prop-sub { color: #606862; font-size: .75rem; line-height: 1.55; }
  .navod-cta .t1 { font-size: .875rem; }
  .navod-cta .t2, .vsd-navod .hint, .vsd-portal { font-size: .78125rem; }
  .navod-cta svg, .note-tiny svg, .note-sm svg { flex-shrink: 0; }
  .import-mapping select, .import-mapping input[type="number"] { min-height: 3.25rem; font-size: 1rem; }
  .import-mapping p, .import-mapping label { font-size: .875rem; }
  .import-mapping .grid-cols2-g16 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
  .calc-frame[data-step="1"] .vsd-p { margin-block: 10px 16px; }
  .navod-cta { border-color: #e9cbb6; border-radius: 13px; background: #fff8f2; }
  .navod-ico { background: #bd510c; border-radius: 10px; }

  .calc-frame[data-step="2"] .fcard,
  .calc-frame[data-step="3"] .fcard { padding: clamp(20px, 4vw, 30px); }
  .tilt-row { gap: 24px; flex-wrap: wrap; }
  .tilt-row > div { min-width: 0; flex-basis: 12rem; }
  .tilt-head, .years-head { flex-wrap: wrap; gap: 8px; }
  .tilt-val, .years-head .v { font-size: 1.125rem; }
  .years-head label { font-size: .875rem; }
  .assump-toggle { min-height: 2.75rem; font-size: .875rem; text-align: left; }
  .pv-roof-card .mt-28 { border-top: 1px solid #e2e6e0; padding-top: 23px; }
  .pv-roof-card .ocard > div > span { font-size: .9375rem !important; }
  .pv-roof-card .ocard > .mono { font-size: .75rem !important; }
  .pv-location-card > .numfield:not(:first-child) { margin-top: 20px; }
  .yield-box { border-color: #e9cbb6; border-radius: 14px; background: #fff8f2; }
  .yield-box .l1,
  .yield-box .v1 { color: #9f430b; }
  .zones-svg { border-color: #d9ded9; border-radius: 14px; background: #f4f6f4; box-shadow: none; }

  .pv-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 21px 20px; align-items: end; }
  .pv-pricing-card .pv-fields > :first-child { grid-column: 1 / -1; }
  .pv-callout { padding: 14px 17px; border: 1px solid #ecd6c4; border-radius: 11px; background: #fff8f1; color: #654b35; font-size: .8125rem; }
  .pv-callout strong { color: #9f430b; }
  .pv-status { padding: 22px; border: 1px solid #d8dfd4; border-radius: 14px; background: #f0f4ee; color: #4c5949; font-size: .8125rem; line-height: 1.8; }
  .pv-status strong { color: #273325; font-family: inherit; font-size: clamp(1.3125rem, 3vw, 1.75rem); letter-spacing: -.025em; }
  .pv-error { border: 1px solid #edc9c2; border-radius: 10px; font-size: .875rem; }
  .pv-section { margin-top: 18px; padding: clamp(18px, 3vw, 24px); border: 1px solid #dfe3df; border-radius: 16px; background: #fff; box-shadow: 0 2px 8px rgba(25,31,27,.04); }
  .pv-section:first-child { margin-top: 0; }
  .pv-section-heading { margin: 0 0 16px; color: #202225; font-size: 1.0625rem; line-height: 1.35; letter-spacing: -.01em; }
  .pv-section .pv-callout { margin-top: 0; }
  .pv-check { min-height: 2.75rem; color: #454b47; font-size: .875rem; cursor: pointer; }
  .import-confirm { min-height: 2.75rem; cursor: pointer; }
  .pv-check input { accent-color: #bd510c; }
  .pv-details { border-color: #dfe3df; font-size: .875rem; }
  .pv-details summary { min-height: 2.75rem; color: #353b37; padding-block: 9px; }
  .pv-details input[type=file] { width: 100%; min-width: 0; font-size: 1rem; }
  .pv-details input[type=file]::file-selector-button { min-height: 2.75rem; padding: 8px 12px; margin-right: 8px; font: inherit; }
  .pv-details summary::marker { color: #bd510c; }

  .calc-frame.wide .res-head { flex-wrap: wrap; gap: 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #d8ddd9; }
  .calc-frame.wide .res-head h1 { min-width: 0; color: #202225; font-size: clamp(1.5rem, 3vw + .5rem, 2.125rem); overflow-wrap: anywhere; }
  .calc-frame.wide .res-head .actions { flex-wrap: wrap; }
  .calc-frame.wide .res-head .actions .btn { min-height: 2.75rem; }
  .calc-frame.wide .res-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; padding: 0; overflow: visible; }
  .calc-frame.wide .res-chips span,
  .calc-frame.wide .res-chips span:first-child { min-width: 0; padding: 5px 9px; border: 1px solid #dfe3df; border-radius: 999px; background: #fff; color: #555d57; font-size: .71875rem; overflow-wrap: anywhere; }
  .calc-frame.wide .res-chips span + span::before { display: none; }
  .calc-frame.wide .prop-card { padding: 18px 22px; border-color: #d8ddd9; border-radius: 16px; background: #fff; box-shadow: 0 2px 8px rgba(25,31,27,.045); }
  .calc-frame.wide .prop-card::before { display: none; }
  .calc-frame.wide .prop-eyebrow { margin-bottom: 7px; color: #747c76; }
  .calc-frame.wide .prop-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 0 0 12px; border-bottom: 1px solid #e6e9e6; text-align: left; }
  .calc-frame.wide .prop-hero-v { font-size: clamp(1.6875rem, 3.5vw, 2.375rem); overflow-wrap: anywhere; }
  .calc-frame.wide .prop-hero-s { margin: 0; }
  .calc-frame.wide .prop-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 12px 0 0; border: 0; }
  .calc-frame.wide .prop-stats .prop-stat { min-width: 0; text-align: left; }
  .calc-frame.wide .prop-stat .prop-v { font-size: .9375rem; overflow-wrap: anywhere; }
  .calc-frame.wide .prop-stat .prop-sub { font-size: .6875rem; }

  .calc-frame.wide .res-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; border: 0; background: transparent; }
  .calc-frame.wide .res-col { gap: 14px; }
  .calc-frame.wide .res-grid .fcard { min-width: 0; padding: 20px; border: 1px solid #dfe3df; border-radius: 16px; background: #fff; box-shadow: 0 2px 8px rgba(25,31,27,.04); }
  .calc-frame.wide .res-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .75fr); grid-template-areas: "label metrics" "value metrics"; align-items: center; gap: 4px 24px; padding: 24px 26px; border: 0; border-radius: 18px; background: #24272b; color: #fff; box-shadow: none; }
  .calc-frame.wide .res-hero .bgsun { display: none; }
  .calc-frame.wide .res-hero .lbl { grid-area: label; color: rgba(255,255,255,.72); }
  .calc-frame.wide .res-hero .big { grid-area: value; min-width: 0; margin: 4px 0 0; font-family: inherit; font-size: clamp(2rem, 5vw, 3.875rem); font-weight: 600; letter-spacing: -.045em; overflow-wrap: anywhere; }
  .calc-frame.wide .res-hero .stats { grid-area: metrics; grid-template-columns: 1fr; gap: 11px; align-self: stretch; margin: 0; padding: 0 0 0 20px; border-top: 0; border-left: 1px solid rgba(255,255,255,.2); }
  .calc-frame.wide .res-hero .stats .l { color: rgba(255,255,255,.68); }
  .calc-frame.wide .res-hero .stats .v { min-width: 0; margin-top: 2px; font-size: 1rem; white-space: normal; overflow-wrap: anywhere; }
  .calc-frame.wide .res-hero .stats > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 18px; }
  .calc-frame.wide .res-hero .stats .l { font-size: .6875rem; }
  .calc-frame.wide .cmp-track { height: 8px; }
  .calc-frame.wide .flow-track { height: 10px; }
  .calc-frame.wide .ministat-grid { gap: 10px; margin-bottom: 12px; background: transparent; }
  .calc-frame.wide .ministat { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .calc-frame.wide .ministat .l { color: #68716b; }
  .calc-frame.wide .ministat .v { color: #202225 !important; font-size: 1.3125rem; line-height: 1.2; overflow-wrap: anywhere; }
  .calc-frame.wide .netprofit { color: #454b47; font-size: .75rem; }
  .calc-frame.wide .res-disclaimer { color: #626a64; font-size: .75rem; }
  .cmp-head, .flow-head { flex-wrap: wrap; gap: 6px; }
  .cmp-head .l, .flow-head .l { font-size: .84375rem; }
  .cmp-head .v { min-width: 0; margin-left: auto; font-size: 1.1875rem; overflow-wrap: anywhere; }
  .flow-head .v { font-size: .8125rem; overflow-wrap: anywhere; }
  .flow-legend { flex-wrap: wrap; }
  .flow-legend span { min-width: 0; max-width: 100%; flex-wrap: wrap; font-size: .75rem; }
  .calc-frame.wide .chart-box { height: clamp(11rem, 24vw, 15rem); min-width: 0; }
  .chart-box svg { touch-action: pan-y; }
  .chart-tip { max-width: calc(100% - 8px); min-width: 0; font-size: .8125rem; overflow-wrap: anywhere; }
  .chart-tip .t { font-size: .75rem; }
  .calc-frame.wide .pv-evidence { margin-top: 14px; }
  .pv-table-wrap { min-width: 0; border-radius: 9px; overscroll-behavior-inline: contain; }
  .pv-table-wrap:focus-visible { outline: 2px solid #bd510c; outline-offset: 3px; }
  .pv-table { font-size: .8125rem; }
  .pv-evidence > .pv-table-wrap .pv-table { table-layout: fixed; }
  .pv-evidence > .pv-table-wrap th { width: 39%; }
  .pv-evidence h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
  .pv-table thead th { background: #f1f3f0; color: #343a36; }
  .pv-table th,
  .pv-table td { border-color: #e2e6e2; }
  .pv-details summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; }
  .pv-details summary::-webkit-details-marker { display: none; }
  .pv-details summary::after { content: "+"; flex: 0 0 auto; color: #a7470d; font-size: 1.125rem; line-height: 1; }
  .pv-details[open] summary::after { content: "−"; }
  .calc-frame.wide .res-cta { margin-top: 14px; padding: 20px 22px; border: 0; border-radius: 16px; background: #24272b; box-shadow: none; }
  .calc-frame.wide .res-cta-t { color: #fff; font-size: 1.0625rem; }
  .calc-frame.wide .res-cta-p { color: #d2d5d3; font-size: .8125rem; }

  @media screen and (max-width: 1023px) {
    .calc-frame.wide .res-grid { grid-template-columns: minmax(0, 1fr); }
    .calc-frame.wide .prop-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calc-brand > span { display: none; }
  }
  @media screen and (max-width: 767px) {
    .calc-dots { display: none; }
  }
  @media screen and (max-width: 639px) {
    html { scrollbar-gutter: auto; }
    .calc-topbar-inner { min-height: 60px; padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right)); }
    .calc-stage, .calc-stage:has(.calc-frame.wide) { padding: 28px max(14px, env(safe-area-inset-right)) max(42px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
    .calc-frame:not(.wide) .card-p8,
    .calc-frame:not(.wide) .card-p7,
    .calc-frame:not(.wide) .card-p6 { padding: 18px; }
    .grid-2,
    .grid-2-3 { gap: 9px; }
    .ocard { min-height: 64px; padding: 11px; }
    .ocard-on,
    .ocard-on:hover { padding: 11px; }
    .pv-fields { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .pv-section { margin-top: 12px; padding: 17px; }
    .calc-frame.wide .res-head { align-items: flex-start; gap: 10px; }
    .calc-frame.wide .res-head .actions { flex-wrap: wrap; }
    .calc-frame.wide .res-chips { gap: 6px; overflow: visible; }
    .calc-frame.wide .prop-card,
    .calc-frame.wide .res-grid .fcard { padding: 17px; }
    .calc-frame.wide .prop-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
    .calc-frame.wide .prop-stat .prop-v { overflow-wrap: anywhere; }
    .calc-frame.wide .res-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "value" "metrics"; gap: 7px; padding: 20px; }
    .calc-frame.wide .res-hero .stats { gap: 9px; padding: 13px 0 0; border-top: 1px solid rgba(255,255,255,.2); border-left: 0; }
    .calc-frame.wide .res-hero .stats > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
    .calc-frame.wide .res-hero .stats .l { min-width: 0; }
    .calc-frame.wide .res-hero .stats .v { flex: 0 1 auto; text-align: right; }
    .calc-frame.wide .ministat-grid { grid-template-columns: 1fr; gap: 12px; }
    .calc-frame.wide .res-cta { align-items: stretch; padding: 18px; }
    .calc-frame.wide .res-cta-btn { width: 100%; justify-content: center; }
    .pv-table { min-width: 620px; }
    .pv-evidence > .pv-table-wrap .pv-table { min-width: 0; table-layout: fixed; }
    .pv-evidence > .pv-table-wrap th { width: 39%; }
    .pv-evidence > .pv-table-wrap th,
    .pv-evidence > .pv-table-wrap td { padding: 12px 10px; font-size: .75rem; overflow-wrap: anywhere; }
  }
  @media screen and (max-width: 359px) {
    .calc-stage { padding-inline: 11px; }
    .grid-2, .grid-2-3, .dso-pick, .calc-nav { grid-template-columns: minmax(0, 1fr); }
    .calc-nav .btn { width: 100%; }
    .dso-btn { flex-direction: row; justify-content: flex-start; gap: 12px; padding-inline: 14px; text-align: left; }
    .calc-frame.wide .prop-stats { grid-template-columns: minmax(0, 1fr); }
    .calc-frame.wide .res-head { flex-direction: column; }
    .calc-frame.wide .res-chips span { min-width: 0; flex-shrink: 1; font-size: .6875rem; padding-inline: 7px; overflow-wrap: anywhere; }
    .calc-frame.wide .prop-card,
    .calc-frame.wide .res-grid .fcard,
    .calc-frame.wide .res-hero { padding: 15px; }
  }
  @media screen and (max-height: 500px) {
    .calc-topbar { position: static; }
    .calc-stage { padding-top: 20px; }
    .calc-intro { padding-block: 12px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .btn, .ocard, .prog > div, .fin, .dso-btn, .dot::after { transition: none !important; }
    .slide-in { animation: none !important; }
    .btn-primary:hover, .ocard:hover { transform: none !important; }
  }
}
