/* ============================================================
   pipeline.css · the residential and commercial pipelines

   Sits on theme.css: same ground, same ink, same accent, same
   .btn, .field and .drop. What is here is the pipeline's own
   furniture: the bar with its step rail, the two-column frame,
   the choice tiles, the incentive cards and the test panel.
   ============================================================ */

.pl-body { background: var(--sc-canvas); color: var(--sc-ink); min-height: 100dvh; }

/* Anything here given a display value would otherwise beat the hidden
   attribute, and the engine shows and hides by that attribute alone. */
.pl [hidden], .pl-test [hidden] { display: none !important; }

.pl-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ------------------------------------------------------------
   The bar: wordmark, rail, phone
   ------------------------------------------------------------ */
.pl-bar {
  --pl-bar-h: 4.25rem;
  position: sticky; top: 0; z-index: 20;
  height: var(--pl-bar-h);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.5rem;
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--sc-canvas) 86%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--nae-hairline);
}
.pl-bar__mark { display: inline-flex; align-items: center; gap: .6rem; color: var(--sc-ink); text-decoration: none; }
.pl-bar__mark img { width: 2rem; height: 2rem; }
.pl-bar__mark b { font-family: var(--sc-font-display); font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; }
.pl-bar__end { display: flex; align-items: center; gap: 1.25rem; font-size: .8125rem; }
.pl-bar__end a { color: var(--sc-ink-soft); text-decoration: none; }
.pl-bar__end a:hover { color: var(--sc-ink); }
.pl-bar__phone { color: var(--sc-ink) !important; font-weight: 600; font-variant-numeric: tabular-nums; }

.pl-rail { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; gap: .25rem; }
.pl-rail button {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .7rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--nae-muted);
  font: 500 .8125rem/1 var(--sc-font-text); cursor: pointer;
  transition: color .16s var(--sc-ease-out), background .16s var(--sc-ease-out);
}
.pl-rail button:disabled { cursor: default; opacity: .55; }
.pl-rail button:not(:disabled):hover { color: var(--sc-ink); background: rgba(244, 241, 236, .06); }
.pl-rail__n {
  display: inline-grid; place-items: center; width: 1.375rem; height: 1.375rem; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--nae-hairline-2);
  font-size: .6875rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.pl-rail button.is-done { color: var(--sc-ink-soft); }
.pl-rail button.is-done .pl-rail__n { background: color-mix(in srgb, var(--sc-accent) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc-accent) 60%, transparent); color: var(--sc-accent); }
.pl-rail button[aria-current] { color: var(--sc-ink); }
.pl-rail button[aria-current] .pl-rail__n { background: var(--sc-accent); color: var(--sc-accent-ink); box-shadow: none; }

/* Under 900px the rail drops to numbers with the current label;
   under 620px the switch link goes and the wordmark text with it. */
@media (max-width: 900px) {
  .pl-rail button:not([aria-current]) .pl-rail__l { display: none; }
  .pl-rail button { padding: .45rem .4rem; }
}
@media (max-width: 620px) {
  .pl-bar { gap: .75rem; }
  .pl-bar__switch { display: none; }
  .pl-bar__mark b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pl-rail { gap: 0; }
  .pl-rail button[aria-current] .pl-rail__l { display: none; }
}

/* ------------------------------------------------------------
   The frame
   ------------------------------------------------------------ */
.pl {
  max-width: 84rem; margin-inline: auto;
  padding: clamp(1.75rem, 5vh, 3.5rem) var(--gutter) 6rem;
  display: grid; gap: 2rem;
}
@media (min-width: 960px) {
  .pl { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(2.5rem, 5vw, 5.5rem); align-items: start; }
  .pl-aside { position: sticky; top: calc(4.25rem + 2.5rem); }
  /* The details step lists incentives, which can run past the
     viewport. A sticky column taller than the screen hides its own
     end, so the last step lets it scroll with the page. */
  .pl[data-last] .pl-aside { position: static; }
}

.pl-aside__count { font-size: .6875rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sc-accent); font-weight: 600; }
.pl-aside h1 {
  margin-top: .9rem;
  font-family: var(--sc-font-display); font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); line-height: 1.04; letter-spacing: -.035em;
  text-wrap: balance; outline: none;
}
.pl-aside__lede { margin-top: 1rem; max-width: 40ch; color: var(--sc-ink-soft); font-size: var(--sc-t-base); line-height: 1.55; text-wrap: pretty; }
.pl-aside__teaser {
  margin-top: 1.25rem; display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8125rem; color: var(--sc-ink);
  padding: .5rem .8rem; border-radius: 999px;
  background: color-mix(in srgb, var(--sc-accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc-accent) 35%, transparent);
}
.pl-aside__teaser::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--sc-accent); flex: none; }

.pl-plate { margin: 2rem 0 0; border-radius: var(--sc-r-md, 10px); overflow: hidden; aspect-ratio: 4 / 3; background: var(--sc-surface); }
.pl-plate img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 959px) {
  .pl-plate { display: none; }
  /* On a phone the incentives follow the form: the column unwraps so its
     parts can be ordered against the form itself. */
  .pl-aside { display: contents; }
  .pl-aside__copy { order: 1; }
  .pl-main { order: 2; }
  .pl-incentives { order: 3; margin-top: 0; }
}
/* No incentive matched: the form stands alone, centred under the heading. */
@media (min-width: 960px) {
  .pl[data-bare] { grid-template-columns: minmax(0, 46rem); justify-content: center; }
}

/* ------------------------------------------------------------
   Questions and choice tiles
   ------------------------------------------------------------ */
.pl-step { display: grid; gap: 2.25rem; }
.pl-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.pl-q__label { padding: 0; margin-bottom: .85rem; font-size: 1rem; font-weight: 600; color: var(--sc-ink); }
.pl-q__hint { margin-left: .4rem; font-size: .75rem; font-weight: 500; color: var(--nae-muted); }
.pl-q__help { margin: -.4rem 0 .85rem; max-width: 52ch; font-size: .8125rem; line-height: 1.5; color: var(--nae-muted); }
/* Missing answers are flagged quietly and only after a Continue: a short
   line under the question and a dot on its label, never a red frame on
   every tile. Contact fields keep their own message. */
.pl-q__err { margin-top: .6rem; font-size: .8125rem; color: var(--sc-ink-soft); display: flex; align-items: center; gap: .5rem; }
.pl-q__err::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: #F2C98A; flex: none; }
.pl-q.is-missing .pl-q__label::after { content: ""; display: inline-block; width: .4rem; height: .4rem; margin-left: .5rem; border-radius: 50%; background: #F2C98A; vertical-align: middle; }
.pl-field__err { margin-top: .6rem; font-size: .8125rem; color: #F2C98A; }
.pl-need { flex-basis: 100%; order: -1; margin: 0 0 .25rem; font-size: .8125rem; color: var(--sc-ink-soft); text-align: right; }
@media (max-width: 720px) { .pl-need { text-align: left; } }
.pl-actions { flex-wrap: wrap; }
.pl-q textarea { width: 100%; }
/* A text question sits in a .field for the input styling; its label still
   reads as a question, not as a form caption. */
.pl-q.field .pl-q__label { font-size: 1rem; letter-spacing: 0; font-weight: 600; color: var(--sc-ink); margin-bottom: .25rem; }

.pl-picks { display: grid; gap: .6rem; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
@media (max-width: 720px) {
  .pl-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-picks:has(.pl-pick--described) { grid-template-columns: minmax(0, 1fr); }
}

.pl-pick { position: relative; display: block; cursor: pointer; }
.pl-pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pl-pick__box {
  position: relative; display: flex; flex-direction: column; gap: .3rem; height: 100%;
  padding: .95rem 2.6rem .95rem 1rem;
  border-radius: var(--sc-r-sm);
  background: color-mix(in srgb, var(--sc-canvas) 82%, #000);
  box-shadow: inset 0 0 0 1px var(--nae-hairline-2);
  transition: box-shadow .16s var(--sc-ease-out), background .16s var(--sc-ease-out), transform .12s var(--sc-ease-out);
}
.pl-pick__box b { font-weight: 600; font-size: .9375rem; line-height: 1.3; color: var(--sc-ink); }
.pl-pick__box em { font-style: normal; font-size: .8125rem; line-height: 1.45; color: var(--sc-ink-soft); }
.pl-pick__mark {
  position: absolute; top: 1rem; right: 1rem;
  width: 1.05rem; height: 1.05rem; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--nae-hairline-2);
  transition: background .16s var(--sc-ease-out), box-shadow .16s var(--sc-ease-out);
}
.pl-pick input[type="checkbox"] + .pl-pick__box .pl-pick__mark { border-radius: 4px; }

@media (hover: hover) and (pointer: fine) {
  .pl-pick:hover .pl-pick__box { box-shadow: inset 0 0 0 1px var(--sc-ink-soft); }
}
.pl-pick:active .pl-pick__box { transform: scale(.985); }
.pl-pick input:focus-visible + .pl-pick__box { outline: 2px solid var(--sc-accent); outline-offset: 2px; }

.pl-pick input:checked + .pl-pick__box {
  background: color-mix(in srgb, var(--sc-accent) 13%, var(--sc-canvas));
  box-shadow: inset 0 0 0 1.5px var(--sc-accent);
}
.pl-pick input:checked + .pl-pick__box .pl-pick__mark {
  background: var(--sc-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%230B2107' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .pl-pick__box, .pl-pick__mark, .pl-rail button { transition: none; }
  .pl-pick:active .pl-pick__box { transform: none; }
}

/* ------------------------------------------------------------
   The details step
   ------------------------------------------------------------ */
.pl-contact { gap: 1.1rem; }
.pl-contact .field label { font-size: .8125rem; letter-spacing: 0; color: var(--sc-ink-soft); }
.pl-contact [aria-invalid="true"] { border-color: #F2C98A !important; }
.pl-error { margin-top: 1.25rem; }
.pl-error a { color: inherit; font-weight: 600; }

/* ------------------------------------------------------------
   Actions. On a phone they pin to the bottom of the screen, so
   Continue is always one thumb away.
   ------------------------------------------------------------ */
.pl-actions { margin-top: 2.5rem; display: flex; justify-content: space-between; gap: .75rem; }
.pl-actions .pl-next { margin-left: auto; min-width: 10rem; }
.pl-privacy { margin-top: 1rem; font-size: .75rem; color: var(--nae-muted); }
.pl:not([data-last]) .pl-privacy { display: none; }

@media (max-width: 720px) {
  .pl { padding-bottom: 7.5rem; }
  .pl-actions {
    position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; margin: 0;
    padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--sc-canvas) 92%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--nae-hairline);
  }
  .pl-actions .pl-next { flex: 1; }
}

/* ------------------------------------------------------------
   Incentives
   ------------------------------------------------------------ */
.pl-incentives { margin-top: 2rem; }
.pl-inc__h { font-family: var(--sc-font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -.02em; margin-bottom: 1rem; }
.pl-inc__sub { margin: 1.75rem 0 .75rem; font-size: .6875rem; letter-spacing: .16em; text-transform: uppercase; color: var(--nae-muted); font-weight: 600; }

.pl-inc { border-top: 1px solid var(--nae-hairline); padding-block: .9rem; }
.pl-inc:last-of-type { border-bottom: 1px solid var(--nae-hairline); }
.pl-inc summary { list-style: none; cursor: pointer; display: grid; gap: .35rem; position: relative; padding-right: 1.75rem; }
.pl-inc summary::-webkit-details-marker { display: none; }
.pl-inc summary::after {
  content: ""; position: absolute; right: .2rem; top: .35rem; width: .5rem; height: .5rem;
  border-right: 1.5px solid var(--nae-muted); border-bottom: 1.5px solid var(--nae-muted);
  transform: rotate(45deg); transition: transform .2s var(--sc-ease-out);
}
.pl-inc[open] summary::after { transform: rotate(-135deg); top: .6rem; }
.pl-inc summary b { font-size: .9688rem; font-weight: 600; line-height: 1.35; }
.pl-inc__meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--nae-muted); font-weight: 600; }
.pl-inc__status {
  letter-spacing: .04em; text-transform: none; font-size: .6875rem;
  padding: .15rem .5rem; border-radius: 999px;
  color: var(--sc-ink-soft); box-shadow: inset 0 0 0 1px var(--nae-hairline-2);
}
.pl-inc--new .pl-inc__status { color: var(--sc-accent-ink); background: var(--sc-accent); box-shadow: none; }
.pl-inc--current .pl-inc__status { color: var(--sc-accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc-accent) 55%, transparent); }
.pl-inc--closing .pl-inc__status, .pl-inc--upcoming .pl-inc__status { color: var(--nae-blue); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nae-blue) 55%, transparent); }
.pl-inc p { margin-top: .6rem; font-size: .8438rem; line-height: 1.55; color: var(--sc-ink-soft); max-width: 58ch; }
.pl-inc .pl-inc__fn { font-size: .75rem; color: var(--nae-muted); }
.pl-inc .pl-inc__why { font-size: .75rem; color: var(--nae-muted); }
.pl-inc__why a { color: var(--sc-ink-soft); margin-left: .35rem; }
.pl-inc__why a:hover { color: var(--sc-accent); }
.pl-inc--note summary b { color: var(--sc-ink-soft); }
.pl-inc__foot { margin-top: 1.25rem; font-size: .75rem; line-height: 1.5; color: var(--nae-muted); max-width: 58ch; }

.pl-noscript { padding: 2rem var(--gutter); color: var(--sc-ink-soft); }
.pl-noscript a { color: var(--sc-accent); }

/* ------------------------------------------------------------
   The test panel. Preview only; pipeline.js never renders it
   for a visitor.
   ------------------------------------------------------------ */
.pl-test {
  position: fixed; z-index: 50; left: 1rem; bottom: 1rem;
  width: min(21rem, calc(100vw - 2rem));
  display: flex; flex-direction: column-reverse;
  font: 500 .75rem/1.4 ui-monospace, "SF Mono", Menlo, monospace;
  color: #EDEBE6;
}
.pl-test__toggle {
  margin-right: auto; display: flex; align-items: center; gap: .5rem;
  padding: .45rem .7rem; border: 0; border-radius: 6px;
  background: #F2C14E; color: #2A2205; font: inherit; font-weight: 700; cursor: pointer;
}
.pl-test__body {
  margin-bottom: .4rem; max-height: calc(100dvh - 9rem); overflow: auto;
  padding: .75rem; border-radius: 8px;
  background: rgba(14, 16, 14, .94); box-shadow: 0 0 0 1px rgba(242, 193, 78, .45), 0 18px 40px rgba(0, 0, 0, .45);
  display: grid; gap: .6rem;
}
.pl-test__row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.pl-test__row--stack { flex-direction: column; align-items: stretch; }
.pl-test__k { width: 100%; color: #F2C14E; font-weight: 700; }
.pl-test__k small { color: #9A9890; font-weight: 500; margin-left: .3rem; }
.pl-test button, .pl-test a {
  padding: .3rem .55rem; border-radius: 5px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: inherit; font: inherit; text-decoration: none;
}
.pl-test button:hover, .pl-test a:hover { background: rgba(255, 255, 255, .16); }
.pl-test [aria-current] { background: #F2C14E; color: #2A2205; }
.pl-test__scn { text-align: left; }
.pl-test label { display: inline-flex; align-items: center; gap: .3rem; margin-right: .6rem; cursor: pointer; }
.pl-test__dbg summary { cursor: pointer; color: #F2C14E; font-weight: 700; }
.pl-test__dbg ul { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .1rem; }
.pl-test__dbg li { color: #77756E; }
.pl-test__dbg li.is-on { color: #B8E08C; }
.pl-test__dbg li span { display: inline-block; width: 2.2em; }
.pl-test__dbg pre { margin: .4rem 0 0; white-space: pre-wrap; word-break: break-word; font: inherit; color: #CFCCC4; max-height: 18rem; overflow: auto; }
.pl-test__keys { color: #9A9890; }
@media (max-width: 720px) { .pl-test { bottom: calc(5rem + env(safe-area-inset-bottom)); } }
.pl-test kbd { padding: 0 .3rem; border-radius: 3px; background: rgba(255, 255, 255, .12); font: inherit; }
