/* ===== HOW SOLAR WORKS ===== */
.hw-hero { padding-block: clamp(36px, 6vw, 88px) clamp(24px, 4vw, 48px); }
.hw-hero-in { display: grid; gap: 24px; }
@media (min-width: 900px) { .hw-hero-in { grid-template-columns: 1.2fr 1fr; align-items: end; gap: clamp(32px, 6vw, 96px); } }
.hw-hero .d1 { font-size: clamp(2.6rem, 9vw, 6rem); }
.hw-diagram { padding-bottom: clamp(48px, 7vw, 96px); }
.hw-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }

/* ---------- linear flow: steps on the left, details beside the chosen step ---------- */
.lin { position: relative; display: grid; gap: 0; }
@media (min-width: 900px) { .lin { grid-template-columns: minmax(300px, 4fr) minmax(0, 7fr); gap: 0 clamp(28px, 3.5vw, 56px); align-items: start; } }
.fl { position: relative; display: flex; flex-direction: column; gap: 10px; }
.fl::before { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; background: repeating-linear-gradient(to bottom, var(--line-2) 0 5px, transparent 5px 10px); }
.st-row { position: relative; }
.st-row.st-sub { padding-left: 34px; }
.fn { position: relative; z-index: 1; display: grid; grid-template-columns: 26px 30px minmax(0, 1fr) 20px; gap: 0 12px; align-items: center; width: 100%; min-height: 64px; padding: 10px 14px 10px 10px; background: var(--white); border: 1px solid var(--line-2); text-align: left; transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.25s var(--ease); }
.st-row.st-sub .fn { min-height: 54px; background: var(--paper); border-style: dashed; }
.fn-n { font: 500 0.7rem var(--f-mono); color: var(--gold-ink); text-align: center; }
.fn > .ic:not(.fn-go) { width: 28px; height: 28px; color: var(--forest); stroke-width: 1.4; }
.st-row.st-sub .fn > .ic:not(.fn-go) { width: 22px; height: 22px; }
.fn-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fn-t b { font: 600 1rem/1.2 var(--f-display); letter-spacing: -0.01em; color: var(--forest); }
.st-row.st-sub .fn-t b { font-size: 0.92rem; }
.fn-t small { font: 400 0.68rem/1.3 var(--f-mono); color: var(--muted); }
.fn .rd { grid-column: 3; font: 500 0.7rem var(--f-mono); color: var(--blue-2); }
.fn .rd:empty { display: none; }
.fn-go { width: 18px; height: 18px; color: var(--muted); transition: transform 0.3s var(--ease); grid-row: 1 / span 2; grid-column: 4; }
.fn > .fn-n, .fn > .ic:not(.fn-go) { grid-row: 1 / span 2; }
.fn:hover { border-color: var(--forest); }
.fn:hover .fn-go { transform: translateX(3px); }
.st-row.done .fn-n { color: var(--leaf); }
.st-row.on .fn { background: var(--forest); border-color: var(--forest); border-style: solid; box-shadow: inset 4px 0 0 var(--gold); }
.st-row.on .fn-t b { color: #fff; }
.st-row.on .fn-t small { color: rgba(255, 255, 255, 0.72); }
.st-row.on .fn > .ic:not(.fn-go), .st-row.on .fn-n { color: var(--gold-2); }
.st-row.on .fn .rd { color: var(--blue-tint); }
.st-row.on .fn-go { color: var(--gold-2); transform: rotate(90deg); }
@media (min-width: 900px) { .st-row.on .fn-go { transform: none; } }

/* detail: inline under the step on phones, beside it on desktop */
.hw-detail { position: relative; padding: clamp(18px, 3.4vw, 34px); margin-top: 10px; }
@media (min-width: 900px) {
  .hw-detail { margin-top: 0; position: sticky; top: calc(var(--hdr-h) + 24px); max-height: calc(100vh - var(--hdr-h) - 48px); overflow-y: auto; overscroll-behavior: contain; }
  .hd-pointer { display: none; position: absolute; left: -9px; top: var(--ptr, 32px); width: 16px; height: 16px; background: var(--white); border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); transform: translateY(-50%) rotate(45deg); transition: top 0.45s var(--ease); }
}
@media (max-width: 899px) { .hd-pointer { display: none; } .st-row.st-sub .hw-detail { margin-left: -34px; } }
.hd-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.hd-ic { flex: none; width: 64px; height: 64px; display: grid; place-items: center; background: var(--forest); color: #fff; }
.hd-ic .ic { width: 34px; height: 34px; }
.hd-what { font-size: clamp(1.05rem, 2.4vw, 1.3rem); line-height: 1.5; max-width: 56ch; margin-bottom: 22px; color: var(--ink); }
.hd-cols { display: grid; gap: 26px; }
@media (min-width: 800px) { .hd-cols { grid-template-columns: 1.2fr 1fr; gap: 48px; } }
.hd-facts { margin-top: 10px; display: grid; gap: 0; }
.hd-facts li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 0.94rem; }
.hd-facts li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 9px; background: var(--gold); }
.hw-detail p#hd-check { margin: 10px 0 20px; }
.hd-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.hw-detail.swap { animation: fadeUp 0.4s var(--ease); }
@keyframes fadeUp { from { opacity: 0.35; } to { opacity: 1; } }

/* demo */
.demo { display: grid; gap: 26px; }
.demo-ctl { display: grid; gap: 4px; }
@media (min-width: 700px) { .demo-ctl { grid-template-columns: 1fr 1fr; gap: 32px; } }
.demo-ctl .label b { color: var(--gold-2); font-weight: 500; }
.demo-chain { display: grid; grid-template-columns: 1fr; gap: 6px; align-items: center; }
.demo-chain i { display: none; color: var(--gold-2); font: 500 1.4rem var(--f-mono); font-style: normal; text-align: center; }
@media (min-width: 720px) { .demo-chain { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; } .demo-chain i { display: block; } }
.dc-n { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border: 1px solid rgba(255, 255, 255, 0.25); text-align: center; background: rgba(255, 255, 255, 0.04); min-width: 0; }
.dc-n .ic { width: 26px; height: 26px; color: var(--gold-2); }
.dc-n b { font: 700 clamp(1.15rem, 4.4vw, 1.6rem) var(--f-display); letter-spacing: -0.02em; }
.dc-n small { font: 500 0.6rem var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.65); }
.dc-n:nth-child(1) b { color: var(--blue-tint); }
.dc-n.meter.exp { border-color: var(--leaf-tint); background: rgba(92, 150, 61, 0.18); }
.dc-n.meter.imp { border-color: var(--gold); background: rgba(242, 165, 26, 0.14); }
.demo-txt { font-size: clamp(1.02rem, 2.4vw, 1.2rem); line-height: 1.55; max-width: 60ch; color: #fff; margin: 0; }
.hw-cta { display: grid; gap: 26px; justify-items: start; }
