/* SolarPanelsCost tools. Scoped to .spc-* so it works inside any theme. */
.spc-calc, .spc-quote, .spc-box {
  --spc-ink: #1d2733;
  --spc-muted: #55606d;
  --spc-line: #d9dee4;
  --spc-bg: #ffffff;
  --spc-soft: #f4f7f9;
  --spc-accent: #0b1f3a;
  --spc-accent-ink: #ffffff;
  --spc-warn: #8a5300;
  --spc-radius: 10px;
  color: var(--spc-ink);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 820px;
  margin: 0 auto 2rem;
}
.spc-form, .spc-results, .spc-box {
  background: var(--spc-bg);
  border: 1px solid var(--spc-line);
  border-radius: var(--spc-radius);
  padding: 1.25rem;
}
.spc-results { margin-top: 1rem; }
.spc-title { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .25rem; }
.spc-sub { color: var(--spc-muted); margin: 0 0 1rem; }
.spc-grid { display: grid; grid-template-columns: 1fr; gap: .875rem 1rem; }
@media (min-width: 600px) { .spc-grid { grid-template-columns: 1fr 1fr; } }
.spc-field label { display: block; font-weight: 600; margin-bottom: .25rem; }
.spc-field input, .spc-field select {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: .5rem .65rem;
  border: 1px solid #a8b1bb; border-radius: 6px; background: #fff; color: var(--spc-ink); font: inherit;
}
.spc-field input:focus, .spc-field select:focus, .spc-btn:focus-visible, .spc-more summary:focus-visible {
  outline: 3px solid #1a73e8; outline-offset: 2px;
}
.spc-hint { display: block; color: var(--spc-muted); font-size: .85rem; margin-top: .25rem; }
.spc-more { margin: 1rem 0; border-top: 1px solid var(--spc-line); padding-top: .75rem; }
.spc-more summary { cursor: pointer; font-weight: 600; color: var(--spc-accent); min-height: 44px; display: flex; align-items: center; }
.spc-more .spc-grid { margin-top: .75rem; }
.spc-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .6rem 1.25rem;
  background: var(--spc-accent); color: var(--spc-accent-ink); border: 0; border-radius: 8px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.spc-btn:hover { filter: brightness(.95); color: var(--spc-accent-ink); }
.spc-btn[disabled] { opacity: .65; cursor: progress; }
.spc-btn-ghost { background: transparent; color: var(--spc-accent); border: 2px solid var(--spc-accent); }
.spc-btn-ghost:hover { color: var(--spc-accent); }
.spc-error { color: #a4161a; font-weight: 600; margin: .75rem 0 0; }
.spc-ok { color: var(--spc-accent); font-weight: 600; }
.spc-estimate-label {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--spc-warn); background: #fff4e0; border-radius: 4px; padding: .15rem .5rem;
}
.spc-verdict { font-size: 1.15rem; margin: .5rem 0 1rem; }
.spc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 720px) { .spc-cards { grid-template-columns: repeat(4, 1fr); } }
.spc-card { min-width: 0; background: var(--spc-soft); border: 1px solid var(--spc-line); border-radius: 8px; padding: .85rem; }
.spc-card span { display: block; font-size: .8rem; color: var(--spc-muted); }
.spc-card strong { display: block; font-size: clamp(1rem, 3.3vw, 1.35rem); line-height: 1.25; margin: .2rem 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.spc-card small { display: block; font-size: .78rem; color: var(--spc-muted); line-height: 1.35; }
.spc-note { background: #fff8e6; border-left: 4px solid #e0a100; padding: .5rem .75rem; margin: 1rem 0; }
.spc-why { background: var(--spc-soft); border: 1px solid var(--spc-line); border-radius: 8px; padding: .85rem 1rem; margin: 0 0 1rem; font-size: .93rem; }
.spc-why p { margin: 0 0 .5rem; }
.spc-why p:last-child { margin-bottom: 0; }
.spc-notices { margin: 1rem 0; }
.spc-notices .spc-note { margin: .5rem 0; }
.spc-fieldset { border: 1px solid var(--spc-line); border-radius: 8px; padding: .85rem 1rem 1rem; margin: 1rem 0; }
.spc-fieldset legend { font-weight: 600; padding: 0 .35rem; }
.spc-fieldset .spc-hint { margin: 0 0 .75rem; }
.spc-chart { margin: 1.25rem 0; }
.spc-chart svg { width: 100%; height: auto; font-size: 12px; fill: var(--spc-muted); }
.spc-chart .spc-line { fill: none; stroke: var(--spc-accent); stroke-width: 2.5; }
.spc-chart .spc-zero { stroke: #8a949e; stroke-dasharray: 4 4; }
.spc-chart figcaption { font-size: .85rem; color: var(--spc-muted); }
.spc-results h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.spc-table-wrap { overflow-x: auto; }
.spc-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spc-table th, .spc-table td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--spc-line); vertical-align: top; }
.spc-table thead th { font-size: .8rem; color: var(--spc-muted); }
.spc-assume td:last-child { color: var(--spc-muted); font-size: .85rem; }
.spc-small { font-size: .88rem; color: var(--spc-muted); }
.spc-next { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.spc-check { display: flex; gap: .5rem; align-items: flex-start; margin: .75rem 0; font-size: .92rem; }
.spc-check input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; flex: none; }
.spc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spc-soon h3 { margin-top: 0; }
.spc-disclosure { font-size: .88rem; color: #55606d; background: #f4f7f9; border-radius: 8px; padding: .6rem .8rem; }

@media (max-width: 420px) {
  .spc-form, .spc-results, .spc-box { padding: 1rem; }
  .spc-cards { gap: .5rem; }
  .spc-card { padding: .65rem; }
  .spc-next { align-items: stretch; flex-direction: column; }
}

/* State table ([spc_state_table]). Scrolls sideways inside its own box on
   narrow screens; the page itself never scrolls sideways. */
.spc-state-table-wrap {
  --spc-ink: #1d2733;
  --spc-muted: #55606d;
  --spc-line: #d9dee4;
  --spc-soft: #f4f7f9;
  --spc-accent: #0b1f3a;
  --spc-warn: #8a5300;
  max-width: 100%;
  margin: 1rem 0 .5rem;
  border: 1px solid var(--spc-line);
  border-radius: 8px;
}
.spc-state-table-wrap:focus { outline: 2px solid var(--spc-accent); outline-offset: 2px; }
.spc-state-table { min-width: 640px; }
.spc-state-table caption { text-align: left; padding: .6rem .5rem; font-size: .88rem; color: var(--spc-muted); }
.spc-state-table thead th { position: sticky; top: 0; background: var(--spc-soft); }
.spc-state-table tbody th { font-weight: 600; white-space: nowrap; }
.spc-state-table td small { color: var(--spc-muted); white-space: nowrap; }
.spc-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; color: var(--spc-ink); }
.spc-sort:focus-visible { outline: 2px solid var(--spc-accent); outline-offset: 2px; }
.spc-sort-icon::after { content: "\2195"; opacity: .45; }
th[aria-sort="ascending"] .spc-sort-icon::after { content: "\2191"; opacity: 1; }
th[aria-sort="descending"] .spc-sort-icon::after { content: "\2193"; opacity: 1; }
.spc-status { display: inline-block; font-size: .75rem; line-height: 1.3; padding: 0 .35rem; border-radius: 4px; white-space: nowrap; }
.spc-status-pending { background: #fff3d6; color: var(--spc-warn); }
.spc-unavailable { color: var(--spc-muted); font-style: italic; }
.spc-state-table tbody th, .spc-state-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: #ffffff; }
.spc-state-table thead th:first-child { z-index: 2; background: var(--spc-soft); }
