/* Sammamish Electrician — Calculator Suite Design Layer */
.calc-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.calc-hub-card {
  background: #fff;
  border: 1px solid var(--softline);
  border-radius: 6px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.calc-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(16, 35, 31, 0.08);
  border-color: var(--lake);
}
.calc-hub-num {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 26px;
  font-weight: 900;
  color: #cad5d0;
  line-height: 1;
}
.calc-hub-card h3 {
  font-size: 20px;
  line-height: 1.25;
  margin: 4px 0 10px;
  padding-right: 36px;
  color: var(--char);
}
.calc-hub-card h3 a:hover {
  color: var(--lake);
}
.calc-hub-card p {
  font-size: 13px;
  line-height: 1.55;
  color: #4a5c55;
  margin: 0 0 14px;
}
.calc-spec-bullets {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--softline);
}
.calc-spec-bullets li {
  font-size: 12px;
  font-weight: 700;
  color: var(--forest);
  padding: 8px 0;
  border-bottom: 1px solid #edf2ef;
}
.calc-spec-bullets li::before {
  content: "✓ ";
  color: var(--clay);
  font-weight: 900;
}
.calc-hub-footer {
  margin-top: auto;
}
.calc-hub-footer .button {
  width: 100%;
}

.calc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--softline);
  border-radius: 6px;
  background: #fff;
}
.calc-bench-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.calc-bench-table th,
.calc-bench-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--softline);
  vertical-align: top;
}
.calc-bench-table th {
  background: var(--char);
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.calc-bench-table tr:last-child td {
  border-bottom: 0;
}
.calc-bench-table tbody tr:hover {
  background: var(--paper);
}

/* Workbench Layout */
.calc-workbench-section {
  background: #fdfdfb;
}
.calc-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 32px;
  align-items: start;
}
.calc-presets-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid #dfd8c9;
  border-radius: 6px;
}
.calc-presets-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--char);
  margin-right: 4px;
}
.calc-preset-btn {
  border: 1px solid #c2cec8;
  background: #fff;
  color: var(--char);
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.calc-preset-btn:hover {
  border-color: var(--lake);
  color: var(--lake);
}
.calc-preset-btn.is-active {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}

.calc-fieldset {
  border: 1px solid var(--softline);
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  margin: 0 0 18px;
}
.calc-fieldset legend {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--clay);
  padding: 0 8px;
}
.calc-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}
.calc-field-row:last-child {
  margin-bottom: 0;
}
.calc-field label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--char);
  margin-bottom: 6px;
}
.calc-field select,
.calc-field input[type="number"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #bcc9c2;
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
  color: var(--char);
  background: #fff;
}
.calc-field select:focus,
.calc-field input:focus {
  outline: 2px solid var(--lake);
  outline-offset: 1px;
}
.calc-field input[type="range"] {
  width: 100%;
  accent-color: var(--clay);
  margin-top: 8px;
  cursor: pointer;
}

.calc-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--mist);
  border: 1px solid var(--softline);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.45;
  color: #364942;
}
.calc-toggle-row input {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--forest);
  flex-shrink: 0;
}
.calc-toggle-row strong {
  color: var(--char);
}

.calc-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.calc-check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--softline);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.calc-check-card:hover {
  border-color: var(--lake);
  background: #f9fbfa;
}
.calc-check-card input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--forest);
  flex-shrink: 0;
}
.calc-check-card span {
  display: flex;
  flex-direction: column;
}
.calc-check-card strong {
  font-size: 12.5px;
  color: var(--char);
  line-height: 1.28;
}
.calc-check-card small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.calc-check-card.is-alert {
  border-left: 3px solid var(--clay);
  background: #fdf9f7;
}

/* Sticky Results Card */
.calc-results-col {
  position: sticky;
  top: 84px;
}
.calc-result-card {
  background: var(--char);
  color: #fff;
  border-radius: 6px;
  padding: 24px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--copper);
}
.calc-res-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #b7d2c6;
  margin-bottom: 10px;
}
.calc-primary-metric small {
  display: block;
  font-size: 12px;
  color: #c3d5ce;
}
.calc-primary-metric strong {
  display: block;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 4px 0 10px;
  color: #fff;
}
.calc-status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 18px;
}
.calc-status-pill.is-good {
  background: rgba(27, 179, 101, 0.18);
  color: #8cf2bd;
  border: 1px solid rgba(27, 179, 101, 0.4);
}
.calc-status-pill.is-warn {
  background: rgba(228, 162, 75, 0.2);
  color: #ffd799;
  border: 1px solid rgba(228, 162, 75, 0.45);
}
.calc-status-pill.is-danger {
  background: rgba(201, 115, 82, 0.28);
  color: #ffc8b5;
  border: 1px solid rgba(229, 127, 90, 0.65);
}

.calc-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.calc-kpi {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 10px 12px;
}
.calc-kpi small {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b4cbc2;
}
.calc-kpi strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-top: 3px;
}

.calc-meter-wrap {
  margin-bottom: 18px;
}
.calc-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #c5d6cf;
  margin-bottom: 6px;
}
.calc-meter-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.calc-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2fb872, var(--copper));
  transition: width 0.25s ease;
}
.calc-meter-fill.is-danger {
  background: linear-gradient(90deg, var(--copper), #e25a3d);
}

.calc-breakdown-box,
.calc-notes-box {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 14px;
  margin-bottom: 16px;
}
.calc-breakdown-box h4,
.calc-notes-box h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #f2bc72;
  margin: 0 0 10px;
}
.calc-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #d6e4de;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}
.calc-breakdown-row strong {
  color: #fff;
  white-space: nowrap;
}
.calc-notes-box ul {
  margin: 0;
  padding-left: 18px;
}
.calc-notes-box li {
  font-size: 12px;
  line-height: 1.5;
  color: #d6e4de;
  margin-bottom: 6px;
}

.calc-summary-actions {
  display: grid;
  gap: 10px;
}
.calc-copy-btn {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.calc-copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
.calc-disclaimer-note {
  font-size: 11px;
  line-height: 1.45;
  color: #9cb4ab;
  margin: 12px 0 0;
}

.calc-siblings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.calc-sibling-card {
  background: #fff;
  border: 1px solid var(--softline);
  border-radius: 6px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.calc-sibling-card:hover {
  transform: translateY(-2px);
  border-color: var(--lake);
}
.calc-sibling-card span {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--clay);
}
.calc-sibling-card strong {
  font-size: 18px;
  color: var(--char);
  margin: 8px 0;
  line-height: 1.25;
}
.calc-sibling-card p {
  font-size: 13px;
  color: #52635d;
  margin: 0 0 14px;
}
.calc-sibling-card small {
  margin-top: auto;
  font-size: 12px;
  font-weight: 800;
  color: var(--lake);
}

@media (max-width: 980px) {
  .calc-hub-grid {
    grid-template-columns: 1fr;
  }
  .calc-workbench {
    grid-template-columns: 1fr;
  }
  .calc-results-col {
    position: static;
  }
}
@media (max-width: 680px) {
  .calc-field-row,
  .calc-check-grid,
  .calc-siblings-grid {
    grid-template-columns: 1fr;
  }
}
