/* Shared styling for the free calculator suite.
   Layers on main.css and reuses its tokens. Every calculator on the site uses
   these classes, so fix a spacing bug here once rather than in twelve files. */

.calc {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: clamp(1.3rem, 3vw, 2.1rem);
  box-shadow: 0 30px 70px rgba(16, 16, 20, 0.08);
  margin: 1.6rem 0 2.2rem;
}
.calc__head { margin-bottom: 1.4rem; }
.calc__head h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 600; letter-spacing: -0.01em; }
.calc__head p { color: var(--muted); margin-top: 0.4rem; font-size: 0.96rem; }

.calc__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; }
@media (max-width: 760px) { .calc__grid { grid-template-columns: 1fr; } }

.calc__field { display: grid; gap: 0.4rem; min-width: 0; }
.calc__field > label { font-weight: 600; font-size: 0.88rem; }
.calc__field select,
.calc__field input[type="number"] {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 0.75rem 0.85rem; outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.calc__field select:focus,
.calc__field input[type="number"]:focus {
  border-color: var(--violet); box-shadow: 0 0 0 3px rgba(108, 43, 242, 0.16);
}
.calc__hint { color: var(--muted); font-size: 0.8rem; }

.calc__features { grid-column: 1 / -1; }
.calc__features > span { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.6rem; }
.calc__checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 0.5rem; }
.calc__check {
  display: flex; align-items: flex-start; gap: 0.6rem;
  border: 1px solid var(--hairline); border-radius: 12px;
  padding: 0.7rem 0.8rem; cursor: pointer; background: var(--paper);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.calc__check:hover { border-color: rgba(108, 43, 242, 0.45); }
.calc__check input { margin-top: 0.15rem; accent-color: var(--violet); width: 17px; height: 17px; flex: none; }
.calc__check span { font-size: 0.9rem; line-height: 1.35; }
.calc__check input:checked ~ span { font-weight: 600; }
.calc__check:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); }

/* ---- result ---- */
.calc__out {
  margin-top: 1.6rem; padding-top: 1.5rem; border-top: 1px solid var(--hairline);
}
.calc__range {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1; color: var(--ink);
  letter-spacing: 0.005em;
}
.calc__range small { display: block; font-family: var(--sans); font-size: 0.9rem; font-weight: 500; color: var(--muted); margin-top: 0.55rem; letter-spacing: 0; }
.calc__bar { height: 8px; border-radius: 999px; background: var(--paper-2); margin: 1.1rem 0 0.5rem; overflow: hidden; }
.calc__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--violet), #b79bff); transition: width 0.35s cubic-bezier(0.16,1,0.3,1), margin-left 0.35s cubic-bezier(0.16,1,0.3,1); }
.calc__scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.76rem; }

.calc__break { list-style: none; display: grid; gap: 0.45rem; margin-top: 1.3rem; }
.calc__break li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; border-bottom: 1px dashed var(--hairline); padding-bottom: 0.45rem; }
.calc__break li b { font-weight: 600; white-space: nowrap; }
.calc__break li:last-child { border-bottom: 0; }

.calc__note {
  margin-top: 1.3rem; background: var(--violet-soft);
  border: 1px solid rgba(108, 43, 242, 0.22); border-radius: 14px;
  padding: 0.95rem 1.05rem; font-size: 0.9rem; color: var(--ink);
}
.calc__note b { font-weight: 600; }
.calc__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.3rem; }
.calc__actions .btn { flex: 1 1 auto; }

/* ---- reference table shared by calculator pages ---- */
.ptable-wrap + .calc__note { margin-top: 1rem; }
