/* BenchCost calculators — WordPress plugin styles
 *
 * Everything for the calculator itself is scoped under .bc so it cannot
 * collide with your theme in either direction.
 * Article helpers are prefixed .bc-* for the same reason.
 */

.bc {
  --bc-bg: #ffffff;
  --bc-alt: #f6f7f9;
  --bc-ink: #16191d;
  --bc-soft: #4a5158;
  --bc-faint: #767d85;
  --bc-line: #dfe3e8;
  --bc-line-soft: #ebeef1;
  --bc-brand: #1f5f4b;
  --bc-brand-ink: #14493a;
  --bc-brand-wash: #e8f2ee;
  --bc-accent: #b3541e;
  --bc-warn-wash: #fff8e6;
  --bc-warn-line: #e8d49a;
  --bc-radius: 10px;
  --bc-radius-sm: 6px;

  font-size: 16px;
  line-height: 1.6;
  color: var(--bc-ink);
  margin: 0 0 30px;
}

.bc *, .bc *::before, .bc *::after { box-sizing: border-box; }

/* ---------- shell ---------- */

.bc .calc {
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  background: var(--bc-bg);
  box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 14px rgba(16,24,40,.05);
  overflow: hidden;
}

.bc .calc-head {
  padding: 15px 20px;
  background: var(--bc-brand);
}

.bc .calc-head h2 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -.01em;
  color: #fff;
  font-family: inherit;
  text-transform: none;
}

.bc .calc-body { padding: 20px; }

/* ---------- fields ---------- */

.bc .field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 15px 17px;
}

.bc .field { display: flex; flex-direction: column; margin: 0; }

.bc .field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bc-soft);
  margin: 0 0 5px;
  display: block;
  text-transform: none;
  letter-spacing: 0;
}

.bc .field .hint {
  font-size: 12px;
  color: var(--bc-faint);
  margin-top: 4px;
  line-height: 1.45;
}

.bc input[type="number"],
.bc select {
  width: 100%;
  max-width: 100%;
  padding: 9px 11px;
  font-size: 16px;          /* 16px stops iOS zooming on focus */
  font-family: inherit;
  line-height: 1.4;
  color: var(--bc-ink);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-sm);
  background: var(--bc-bg);
  height: auto;
  margin: 0;
  box-shadow: none;
  transition: border-color .12s, box-shadow .12s;
}

.bc input[type="number"]:focus,
.bc select:focus {
  outline: none;
  border-color: var(--bc-brand);
  box-shadow: 0 0 0 3px var(--bc-brand-wash);
}

/* ---------- buttons ---------- */

.bc .calc-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.bc button {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  padding: 10px 20px;
  border-radius: var(--bc-radius-sm);
  border: 1px solid var(--bc-brand);
  background: var(--bc-brand);
  color: #fff;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  width: auto;
  box-shadow: none;
  transition: background .12s;
}

.bc button:hover { background: var(--bc-brand-ink); color: #fff; }

.bc button:focus-visible {
  outline: 2px solid var(--bc-brand);
  outline-offset: 2px;
}

.bc button.ghost {
  background: transparent;
  color: var(--bc-soft);
  border-color: var(--bc-line);
}

.bc button.ghost:hover { background: var(--bc-alt); color: var(--bc-ink); }

/* ---------- results ---------- */

.bc .result {
  margin-top: 20px;
  border-top: 1px solid var(--bc-line-soft);
  padding-top: 18px;
}

.bc .result[hidden] { display: none; }

.bc .headline-figure {
  background: var(--bc-brand-wash);
  border: 1px solid #cfe3da;
  border-radius: var(--bc-radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.bc .headline-figure .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
  color: var(--bc-brand-ink);
  margin-bottom: 4px;
}

.bc .headline-figure .value {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -.025em;
  color: var(--bc-brand-ink);
  line-height: 1.1;
}

.bc .headline-figure .sub {
  font-size: 14px;
  color: var(--bc-soft);
  margin-top: 5px;
}

.bc .stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 11px;
  margin-bottom: 16px;
}

.bc .stat {
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-sm);
  padding: 11px 13px;
  background: var(--bc-alt);
}

.bc .stat .k {
  font-size: 11.5px;
  color: var(--bc-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 3px;
}

.bc .stat .v { font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.bc .stat .n { font-size: 12px; color: var(--bc-faint); margin-top: 2px; }

/* ---------- tables inside the calculator ---------- */

.bc .table-scroll { overflow-x: auto; margin: 0 0 16px; }

.bc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 0;
  border: none;
  background: none;
}

.bc th, .bc td {
  text-align: left;
  padding: 8px 11px;
  border: none;
  border-bottom: 1px solid var(--bc-line-soft);
  vertical-align: top;
  background: none;
}

.bc th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--bc-faint);
  font-weight: 700;
  border-bottom: 1px solid var(--bc-line);
}

.bc td.num, .bc th.num { text-align: right; font-variant-numeric: tabular-nums; }

.bc tbody tr:last-child td { border-bottom: none; }
.bc tbody tr:nth-child(odd) { background: none; }

.bc tr.total td {
  font-weight: 700;
  border-top: 2px solid var(--bc-line);
  background: var(--bc-alt);
}

/* ---------- caveat note inside the calculator ---------- */

.bc .note {
  border-left: 3px solid var(--bc-brand);
  background: var(--bc-alt);
  padding: 13px 16px;
  border-radius: 0 var(--bc-radius-sm) var(--bc-radius-sm) 0;
  font-size: 14.5px;
  margin: 0;
}

.bc .note.caution {
  border-left-color: var(--bc-accent);
  background: var(--bc-warn-wash);
  border-top: 1px solid var(--bc-warn-line);
  border-right: 1px solid var(--bc-warn-line);
  border-bottom: 1px solid var(--bc-warn-line);
}

.bc .note p { margin: 0; }
.bc .note strong { color: var(--bc-ink); }

@media (max-width: 600px) {
  .bc .headline-figure .value { font-size: 27px; }
}

/* ================================================================== *
 * Article helpers — used by the pasted post content, outside .bc
 * ================================================================== */

.bc-table-scroll {
  overflow-x: auto;
  margin: 0 0 22px;
  -webkit-overflow-scrolling: touch;
}

.bc-table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.bc-table-scroll th,
.bc-table-scroll td {
  text-align: left;
  padding: 9px 12px;
  border: none;
  border-bottom: 1px solid #ebeef1;
  vertical-align: top;
}

.bc-table-scroll th {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #767d85;
  font-weight: 700;
  border-bottom: 1px solid #dfe3e8;
  white-space: nowrap;
}

.bc-table-scroll td.num,
.bc-table-scroll th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bc-note {
  border-left: 3px solid #1f5f4b;
  background: #f6f7f9;
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  margin: 0 0 22px;
}

.bc-note.bc-caution {
  border-left-color: #b3541e;
  background: #fff8e6;
  border-top: 1px solid #e8d49a;
  border-right: 1px solid #e8d49a;
  border-bottom: 1px solid #e8d49a;
}

.bc-note p:last-child { margin-bottom: 0; }

.bc-sources {
  font-size: 14.5px;
  color: #4a5158;
  background: #f6f7f9;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 30px 0;
}

.bc-sources ol { margin: 0; padding-left: 20px; }
.bc-sources li { margin-bottom: 6px; }

/* ---------- quote checker: verdict, meter, notes ---------- */

.bc .headline-figure.verdict { border-width: 1px; }

.bc .verdict-good    { background: #e8f2ee; border-color: #cfe3da; }
.bc .verdict-ok      { background: #e8f2ee; border-color: #cfe3da; }
.bc .verdict-warn    { background: #fdf6e3; border-color: #e8d49a; }
.bc .verdict-caution { background: #fdf6e3; border-color: #e8d49a; }
.bc .verdict-high    { background: #fbeee6; border-color: #eccbb4; }

.bc .verdict .value { display: flex; align-items: center; gap: 11px; font-size: 25px; line-height: 1.25; }

.bc .verdict-icon {
  width: 27px; height: 27px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 15px; font-weight: 800; line-height: 1;
  color: #fff; flex-shrink: 0;
}

.bc .verdict-good .verdict-icon,
.bc .verdict-ok .verdict-icon      { background: #1f5f4b; }
.bc .verdict-warn .verdict-icon,
.bc .verdict-caution .verdict-icon { background: #8a6100; }
.bc .verdict-high .verdict-icon    { background: #a03c10; }

.bc .verdict-good .verdict-text,
.bc .verdict-ok .verdict-text      { color: #14493a; }
.bc .verdict-warn .verdict-text,
.bc .verdict-caution .verdict-text { color: #6d4d00; }
.bc .verdict-high .verdict-text    { color: #8a3410; }

.bc .verdict .sub { color: #4a5158; }

/* the meter */

.bc .meter { margin: 0 0 18px; }

.bc .meter-cap {
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: #767d85; margin-bottom: 10px;
}

.bc .meter-track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: #eef0f3;
  margin: 0 0 9px;
}

.bc .meter-band {
  position: absolute; top: 0; bottom: 0;
  background: #1f5f4b;
  border-radius: 7px;
  opacity: .28;
}

.bc .meter-mark {
  position: absolute;
  top: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .3);
}

.bc .meter-mark-good,
.bc .meter-mark-ok      { background: #1f5f4b; }
.bc .meter-mark-warn,
.bc .meter-mark-caution { background: #8a6100; }
.bc .meter-mark-high    { background: #a03c10; }

.bc .meter-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: #767d85;
  font-variant-numeric: tabular-nums;
}

.bc .meter-range-label { color: #14493a; font-weight: 600; text-align: center; }

/* advice line and the ask-about list */

.bc .advice {
  font-size: 16px;
  color: #16191d;
  background: #f6f7f9;
  border-radius: 8px;
  padding: 13px 16px;
  margin: 0 0 18px;
}

.bc .advice p { margin: 0; }

.bc .notes-box {
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 0 0 18px;
  background: #ffffff;
}

.bc .notes-box h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #16191d;
  text-transform: none;
  letter-spacing: 0;
}

.bc .notes-box ul { margin: 0; padding-left: 20px; }
.bc .notes-box li { margin-bottom: 7px; font-size: 15px; color: #4a5158; line-height: 1.5; }
.bc .notes-box li:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .bc .verdict .value { font-size: 20px; }
  .bc .meter-scale { font-size: 11.5px; }
  .bc .meter-range-label { display: none; }
}
