/* CAQA SolarShare: one household record, opened layer by layer back to the roof.
   Original CSS for CAQA. System fonts only. */
:root {
  --plaster: #fbf7ee; --white: #ffffff; --ink: #232150; --ink-2: #4c4a6b; --line: #d8d0bd;
  --sun: #f2b705; --sun-soft: #fdeeb8; --brick: #9a3412; --brick-soft: #fbe5da; --leaf: #26663a; --leaf-soft: #e0efe2; --slate: #5b5f73;
  --head: Corbel, "Segoe UI", sans-serif;
  --text: Cambria, Constantia, Georgia, serif;
  --num: Bahnschrift, "Segoe UI", sans-serif;
  --pad: clamp(1rem, 3vw, 2.5rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--plaster); color: var(--ink); font: 400 1.04rem/1.58 var(--text); }
a { color: var(--ink); text-underline-offset: .2em; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.12; margin: 0 0 .55rem; }
h2 { font-size: clamp(1.4rem, 2.3vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .75rem; }
button { font: 700 1rem/1.2 var(--head); color: var(--ink); cursor: pointer; }
.fine { font-size: .92rem; color: var(--ink-2); }

/* header: sun band, plaque, segmented control */
.roof { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: .6rem var(--pad); background: var(--sun); }
.plaque { justify-self: start; background: var(--white); padding: .1rem .9rem; border-radius: 0 1.4rem 0 1.4rem; }
.caqa-lockup { color: var(--ink); }
.word { font: 700 1.35rem/1 var(--head); }
.seg { display: flex; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 3px; }
.seg a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.15rem; border-radius: 999px; text-decoration: none; font: 700 1.02rem var(--head); }
.seg a[aria-current="page"] { background: var(--ink); color: #fff; }
.sunbtn { justify-self: end; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 .98rem var(--head); text-decoration: none; box-shadow: 0 0 0 4px var(--white); }

/* overview opening */
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .8rem 2rem; padding: 1.1rem var(--pad) .9rem; }
.tags { font: 700 .95rem var(--head); color: var(--brick); margin: 0; }
.head-row h1 { font-size: clamp(1.9rem, 3.1vw, 2.75rem); margin: 0; }
.picker p { font: 700 .95rem var(--head); margin: 0 0 .25rem; }
.picker div { display: flex; flex-wrap: wrap; gap: .3rem; }
.picker button { min-height: 44px; min-width: 4.4rem; padding: 0 .7rem; background: var(--white); border: 1.5px solid var(--ink); border-radius: .4rem .4rem 0 0; }
.picker button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* the layers: columns that open to the right */
.why { display: flex; align-items: stretch; margin: 0 var(--pad); border: 2px solid var(--ink); background: var(--white); }
.col { min-width: 0; padding: .9rem 1rem 1rem; border-left: 2px solid var(--ink); flex: 1 1 0; }
.c1 { border-left: 0; background: var(--sun-soft); }
.step { display: block; font: 700 .88rem var(--head); color: var(--brick); margin: 0 0 .2rem; }
.col h2 { font-size: 1.35rem; }
.figure { font: 600 clamp(3.4rem, 6vw, 5.4rem)/1 var(--num); margin: .2rem 0 .6rem; }
.figure small { display: block; font: 700 1.05rem var(--head); margin-top: .3rem; }
dl { margin: 0 0 .7rem; }
dt { font: 700 .88rem var(--head); color: var(--ink-2); }
dd { margin: 0 0 .45rem; }
.openbtn, .send { min-height: 48px; width: 100%; padding: .4rem .8rem; background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: .4rem; }
html:not(.js) .openbtn, .openbtn[aria-expanded="true"] { display: none; }
.openbtn:hover, .send:hover { background: var(--brick); border-color: var(--brick); color: #fff; }
.doorbtn, .openall-line { display: none; }
.door { font-size: 1.35rem; }
/* closed layers (only when script is running) */
.js .col:not(.open) { background: repeating-linear-gradient(135deg, var(--plaster) 0 14px, #f4eedf 14px 28px); display: flex; flex-direction: column; justify-content: center; }
.js .col:not(.open) .body { display: none; }
.js .col:not(.open) .doorbtn { display: block; min-height: 48px; background: var(--white); border: 2px dashed var(--ink); border-radius: .4rem; padding: .4rem .6rem; }
.js .col.open { flex: 1.5 1 0; }
.js .openall-line { display: block; text-align: right; margin: .4rem var(--pad) 0; }
.openall { min-height: 44px; background: transparent; border: 0; text-decoration: underline; padding: 0 .4rem; }

.weights { list-style: none; margin: 0 0 .7rem; padding: 0; }
.weights li { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr) 2.8rem; align-items: center; gap: .4rem; padding: .16rem .3rem; font-family: var(--num); font-size: .95rem; }
.weights li.on { background: var(--sun-soft); outline: 2px solid var(--ink); font-weight: 700; }
.wbar { width: 100%; height: .8rem; display: block; }
.wbar rect { fill: var(--slate); }
.weights li.on .wbar rect { fill: var(--brick); }
.calc { margin-bottom: .5rem; }
.limit { border-left: 5px solid var(--sun); padding-left: .6rem; }
.flow { display: block; width: 100%; height: auto; max-height: 26rem; margin-bottom: .6rem; }
.flow .source { fill: var(--sun); stroke: var(--ink); stroke-width: 1.5; }
.flow .ribbon { fill: var(--sun); fill-opacity: .28; stroke: #b88a00; stroke-width: .6; }
.flow .end { stroke: var(--ink); stroke-width: .8; }
.flow .rb .end:not([fill]) { fill: var(--ink-2); }
.flow .on .ribbon { fill: var(--brick); fill-opacity: .55; stroke: var(--brick); stroke-width: 1.5; }
.flow .on text { font-weight: 700; fill: var(--brick); }
.flow .rem .ribbon { fill: #8a8ea3; fill-opacity: .2; stroke: var(--slate); stroke-dasharray: 5 3; stroke-width: 1.2; }
.flow text { font: 14px var(--num); fill: var(--ink); }
.flow .srct { font-size: 13px; font-weight: 700; }
.recon { list-style: none; margin: 0 0 .6rem; padding: 0; font-family: var(--num); font-size: .95rem; }
.recon li { display: flex; justify-content: space-between; gap: .6rem; padding: .05rem .3rem; border-bottom: 1px dotted var(--line); }
.recon li.on { background: var(--sun-soft); font-weight: 700; }
.recon .sum { border-top: 2px solid var(--ink); font-weight: 700; }
.recon .remrow { background: repeating-linear-gradient(45deg, var(--white) 0 6px, #e9eaf0 6px 9px); }
fieldset { border: 1.5px solid var(--line); margin: 0 0 .5rem; padding: .2rem .7rem; }
legend { font: 700 .95rem var(--head); padding: 0 .25rem; }
fieldset label { display: flex; align-items: center; gap: .55rem; min-height: 40px; cursor: pointer; }
input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); flex: none; }
.verdict { margin-top: .5rem; padding: .5rem .7rem; border: 1.5px solid var(--line); font-size: .98rem; min-height: 4.4rem; }
.verdict[data-tone="ok"] { border: 3px solid var(--leaf); background: var(--leaf-soft); }
.verdict[data-tone="no"] { border: 6px double var(--brick); background: var(--brick-soft); }

.chain-text, .asks, .included, .sec, .ptop { max-width: 74rem; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.chain-text { padding-top: 2.4rem; padding-bottom: 2rem; text-align: center; }
.para { font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.6; max-width: 52rem; margin: 0 auto; }
.asks { padding-bottom: 2.4rem; }
.qa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.qa > div { background: var(--white); padding: 1.1rem 1.2rem; border-radius: 1.4rem 1.4rem 1.4rem 0; border: 2px solid var(--ink); }
.qa h3 { font-family: var(--text); font-style: italic; }
.included { padding-bottom: 3rem; }
.inc { list-style: none; padding: 0; margin: 0 0 1rem; border-top: 2px solid var(--ink); }
.inc li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.inc b { display: inline-block; min-width: 12rem; font-family: var(--head); font-size: 1.1rem; }
.links { display: flex; flex-wrap: wrap; gap: .4rem 1.8rem; }
.links a { display: inline-flex; align-items: center; min-height: 44px; font: 700 1.05rem var(--head); text-decoration-color: var(--sun); text-decoration-thickness: 4px; }

/* inner pages */
.ptop { padding-top: 2.4rem; padding-bottom: 1.6rem; }
.ptop h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); border-bottom: 8px solid var(--sun); display: inline-block; padding-bottom: .2rem; }
.ptop p { color: var(--ink-2); max-width: 48rem; }
.sec { padding-bottom: 2.4rem; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 1.4rem; padding-left: 1.4rem; border-left: 3px solid var(--ink); }
.tree li { padding-top: .7rem; }
.tree li > div { background: var(--white); border: 1.5px solid var(--ink); padding: .7rem 1rem; max-width: 40rem; position: relative; }
.tree ul > li > div::before { content: ""; position: absolute; left: -1.5rem; top: 1.4rem; width: 1.4rem; border-top: 3px solid var(--ink); }
.tree p { margin: 0; }
.rulecard { background: var(--ink); color: #fff; padding-top: 1.8rem; padding-bottom: 1.2rem; margin-bottom: 2.4rem; max-width: calc(74rem - 2 * var(--pad)); }
.big { font: 700 clamp(1.5rem, 2.8vw, 2.1rem)/1.28 var(--head); max-width: 40rem; }
.equation { font: 600 clamp(1.05rem, 2vw, 1.35rem) var(--num); color: var(--sun); }
.duo, .demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.duo > div { background: var(--white); border-top: 8px solid var(--sun); padding: 1rem 1.2rem; }
.duo > div + div { border-top-color: var(--ink); }
.duo ul { padding-left: 1.1rem; margin: 0; }
.need { columns: 2; column-gap: 3rem; padding-left: 1.1rem; }
.need li { break-inside: avoid; margin-bottom: .5rem; }
.avail p { background: var(--white); border: 1px solid var(--line); padding: .7rem 1rem; margin-bottom: .5rem; }
.st { display: inline-block; font: 700 .9rem var(--head); padding: 0 .55rem; border: 2px solid; margin-right: .6rem; }
.st.now { color: var(--leaf); } .st.plan { color: var(--ink); border-style: dashed; } .st.no { color: var(--brick); border-style: dotted; }
.stages { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: .6rem; }
.stages li { counter-increment: s; position: relative; background: var(--white); border: 2px solid var(--ink); padding: .8rem 1.2rem .5rem 5rem; }
.stages li:nth-child(2) { margin-left: 2rem; } .stages li:nth-child(3) { margin-left: 4rem; } .stages li:nth-child(4) { margin-left: 6rem; }
.stages li::before { content: counter(s); position: absolute; left: 0; top: 0; bottom: 0; width: 3.8rem; display: grid; place-items: center; background: var(--sun); font: 600 1.8rem var(--num); }
.scroll { overflow-x: auto; background: var(--white); border: 2px solid var(--ink); }
table { width: 100%; min-width: 36rem; border-collapse: collapse; font-family: var(--num); font-size: .98rem; }
caption { text-align: left; padding: .6rem .8rem; font-family: var(--text); color: var(--ink-2); }
th, td { text-align: right; padding: .45rem .8rem; border-top: 1px solid var(--line); }
th:first-child { text-align: left; }
tbody tr:last-child > * { border-top: 2px solid var(--ink); font-weight: 700; background: var(--sun-soft); }
.hint { display: none; font-size: .88rem; color: var(--ink-2); }
.outs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.o { background: var(--white); border: 3px solid var(--leaf); padding: 1rem 1.2rem; }
.o.held { border: 6px double var(--brick); }
.k { font: 700 .95rem var(--head); color: var(--leaf); margin: 0; }
.held .k { color: var(--brick); }
.eq { font: 600 1.3rem var(--num); }
.cover { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 2px solid var(--ink); background: var(--white); }
.cover li { padding: 1rem; border-left: 1px solid var(--line); }
.cover li:first-child { border-left: 0; }
.askbar { background: var(--sun-soft); border: 2px solid var(--ink); padding: 1.2rem 1.4rem; border-radius: 0 2rem 0 2rem; }
.askbtn { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 54px; padding: .5rem 1.6rem; background: var(--ink); color: #fff; font: 700 1.15rem var(--head); text-decoration: none; border-radius: 999px; margin-bottom: .6rem; }
.faq details { border-bottom: 1.5px solid var(--line); max-width: 52rem; }
.faq summary { cursor: pointer; min-height: 44px; padding: .75rem 0; font: 700 1.15rem var(--head); }

.foot { background: var(--white); border-top: 8px solid var(--sun); padding: 1.4rem var(--pad) 1.8rem; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; }
.status { font-size: .92rem; color: var(--ink-2); max-width: 56rem; margin: .8rem 0 0; }

@media (max-width: 1100px) {
  .why { flex-direction: column; }
  .col { border-left: 0; border-top: 2px solid var(--ink); flex: none; }
  .js .col.open { flex: none; }
  .c1 { border-top: 0; }
  .col .body { max-width: 34rem; }
}
@media (max-width: 760px) {
  .roof { grid-template-columns: 1fr auto; padding: .5rem .7rem .6rem; gap: .5rem; }
  .plaque { padding: 0 .5rem; }
  .plaque .caqa-lockup { gap: 8px; }
  .word { font-size: 1.12rem; }
  .sunbtn { width: 52px; height: 52px; }
  .seg { grid-column: 1 / -1; grid-row: 2; }
  .seg a { flex: 1; padding: 0 .2rem; font-size: .95rem; }
  .head-row { padding-top: .8rem; }
  .picker div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .picker { width: 100%; }
  .picker button { min-width: 0; padding: 0 .2rem; }
  .why { margin: 0 .7rem; }
  .figure { font-size: 3.2rem; }
  .js .col:not(.open) { padding: .7rem 1rem .8rem; }
  .js .col:not(.open) .door { font-size: 1.15rem; }
  .qa, .duo, .outs { grid-template-columns: minmax(0, 1fr); }
  .cover { grid-template-columns: minmax(0, 1fr); }
  .cover li { border-left: 0; border-top: 1px solid var(--line); }
  .cover li:first-child { border-top: 0; }
  .need { columns: 1; }
  .stages li { padding-left: 4rem; }
  .stages li::before { width: 3rem; }
  .stages li:nth-child(2) { margin-left: .5rem; } .stages li:nth-child(3) { margin-left: 1rem; } .stages li:nth-child(4) { margin-left: 1.5rem; }
  .inc b { display: block; }
  .rulecard { margin-left: .7rem; margin-right: .7rem; }
  .hint { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .col.open .body { animation: unfold .3s ease-out; }
  @keyframes unfold { from { transform: translateX(-10px); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
/* shape previews on closed layers */
.sketch { display: none; width: 100%; max-width: 15rem; height: auto; margin: 1.4rem auto 0; }
.js .col:not(.open) .sketch { display: block; }
.sketch .lo { fill: #a9a9bd; } .sketch .hi { fill: var(--brick); } .sketch .soft { fill: #f6d36a; }
.sketch .sunfill { fill: var(--sun); } .sketch .dash { fill: #fff; stroke: var(--slate); stroke-width: 2; stroke-dasharray: 5 4; }
.sketch .line { stroke: var(--ink); stroke-width: 5; fill: none; }
@media (max-width: 1100px) { .js .col:not(.open) .sketch { display: none; } }
/* dependency tree connectors stop at the last child */
.tree ul { border-left: 0; }
.tree ul > li { position: relative; }
.tree ul > li::before { content: ""; position: absolute; left: -1.5rem; top: 0; bottom: 0; border-left: 3px solid var(--ink); }
.tree ul > li:last-child::before { bottom: auto; height: 2.25rem; }
@media (max-width: 760px) {
  table { min-width: 0; font-size: .84rem; }
  th, td { padding: .4rem .22rem; overflow-wrap: normal; }
  thead th { font-size: .74rem; vertical-align: bottom; }
}
