/* ============================================================
   PepRecon Unit Converter

   Built on the shared primitives (.calc-shell, .calc-card, .field,
   .field-row). Everything here is specific to the converter: the outputs
   row and the verdict line.
   ============================================================ */

/* Wider than a single calculator: four cards read better two-up on a
   desktop than as one long column. */
.calc-shell--convert {
  max-width: 900px;
}

.cv-intro {
  margin: 0 0 22px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.cv-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  align-items: start;
}

.cv-card {
  padding: 22px;
}

.cv-card h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.cv-sub {
  margin: 0 0 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- Outputs ----------
   A definition list, because that is what this is: a term and its value.
   Equal columns so the numbers line up between cards. */
.cv-out {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 1px;
  margin: 16px 0 0;
  padding: 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.cv-out > div {
  padding: 10px 12px;
  background: var(--bg-subtle);
  min-width: 0;
}

.cv-out dt {
  margin: 0 0 3px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.cv-out dd {
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  /* Long conversions (1,250,000 mcg) must wrap rather than widen the grid. */
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.cv-out dd:empty::before {
  content: "\00b7";
  color: var(--text-faint);
  font-weight: 400;
}

/* ---------- Verdict ----------
   The reason this page exists. Every competitor's converter returns the
   number; this one says whether the number makes sense. */
.cv-verdict {
  margin: 14px 0 0;
  padding: 10px 12px 10px 14px;
  border-left: 3px solid var(--border-strong);
  border-radius: 0 8px 8px 0;
  background: var(--bg-subtle);
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.cv-verdict--ok {
  border-left-color: var(--success);
}

.cv-verdict--note {
  border-left-color: var(--accent);
}

.cv-verdict--warn {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: var(--text);
}

/* ---------- IU card ----------
   The substance picker leads, because without it the conversion is
   meaningless. The blocked state is a first-class result, not an error. */
.cv-note {
  margin: 14px 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.cv-blocked {
  margin: 16px 0 0;
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
  background: var(--bg-subtle);
}

.cv-blocked strong { color: var(--text); }

.cv-cap-note {
  display: block;
  margin-top: 10px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-faint);
}

/* ---------- Cross-links ---------- */
.cv-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.cv-tools a {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-elevated);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cv-tools a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.cv-tools .cv-tools__name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.cv-tools .cv-tools__hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .calc-shell--convert { padding: 0 16px; }
  .cv-card { padding: 18px; }
  .cv-grid { grid-template-columns: 1fr; }
}

@media print {
  .cv-grid { grid-template-columns: 1fr 1fr; }
  .cv-card { break-inside: avoid; box-shadow: none; }
  .cv-tools { display: none; }
}
