/* Shared styles for interactive tool pages (checklist, calculators) */

.calc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow);
  margin: 8px 0 26px;
}

.calc-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 620px) {
  .calc-grid.two { grid-template-columns: 1fr 1fr; }
}

.tool-field {
  display: grid;
  gap: 6px;
}

.tool-field label {
  font-weight: 680;
  color: #334139;
  font-size: 0.95rem;
}

.tool-field .hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.tool-field input[type="number"],
.tool-field select {
  min-height: 46px;
  width: 100%;
  border: 1px solid #b8cbbb;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  font-size: 1rem;
}

.tool-field input:focus,
.tool-field select:focus {
  outline: 3px solid rgba(35, 131, 92, 0.18);
  border-color: var(--green);
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-row label {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid #b8cbbb;
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-weight: 620;
  text-align: center;
}

.radio-row input { position: absolute; opacity: 0; pointer-events: none; }
.radio-row label:has(input:checked) {
  border-color: var(--green);
  background: var(--surface-2);
  color: var(--green-dark);
  box-shadow: inset 0 0 0 1px var(--green);
}

/* Result panel */
.tool-result {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 20px 22px;
}

.result-headline {
  font-size: 2rem;
  font-weight: 820;
  color: var(--green-dark);
  line-height: 1.1;
  margin: 0 0 4px;
}

.result-sub { color: var(--muted); margin: 0 0 14px; }

.result-breakdown {
  display: grid;
  gap: 8px;
  margin: 0;
}

.result-breakdown .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}

.result-breakdown .row:last-child { border-bottom: 0; }
.result-breakdown .row.total { font-weight: 780; color: var(--ink); border-top: 2px solid var(--green); padding-top: 10px; }
.result-breakdown .val { font-variant-numeric: tabular-nums; white-space: nowrap; }

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 720;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.verdict.yes { background: #d8efe1; color: #14573d; }
.verdict.no  { background: #fbe1dc; color: #a5342a; }

.tool-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 14px;
}

/* Checklist */
.progress-wrap { margin: 4px 0 24px; }
.progress-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  transition: width 0.35s ease;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 620;
}

.check-group { margin: 0 0 8px; }
.check-group > h2 {
  font-size: 1.15rem;
  margin: 22px 0 10px;
}

.calc-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.calc-check:has(input:checked) {
  background: var(--surface-2);
  border-color: #bfe0cf;
}
.calc-check input[type="checkbox"] {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  flex: none;
  cursor: pointer;
}
.calc-check .ci-body { display: grid; gap: 3px; }
.calc-check .ci-title { font-weight: 640; }
.calc-check:has(input:checked) .ci-title { text-decoration: line-through; color: var(--muted); }
.calc-check .ci-desc { font-size: 0.9rem; color: var(--muted); }
.calc-check .ci-desc a { color: var(--green-dark); text-decoration: underline; }

.checklist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 4px;
}
.calc-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-weight: 640;
  cursor: pointer;
}
.calc-ghost:hover { border-color: var(--green); color: var(--green-dark); }
