/* ── Calculator-specific styles ── */

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 540px) {
  .calc-grid { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 0.75rem;
  font-family: var(--head);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field .input-wrap {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface2);
  transition: border-color 0.2s, background 0.3s;
}
.field .input-wrap:focus-within {
  border-color: var(--accent);
}
.field input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  outline: none;
}
.field .unit-badge {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  border-left: 1.5px solid var(--border);
  white-space: nowrap;
  transition: background 0.3s, border-color 0.3s;
}

/* Select elements inside input-wrap */
.unit-select {
  border: none;
  border-left: 1.5px solid var(--border);
  outline: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--surface);
  color: var(--text-muted);
  padding: 0 10px;
  transition: background 0.3s, border-color 0.3s;
}
.syringe-select {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.88rem;
  background: var(--surface2);
  color: var(--text);
  padding: 0 12px;
  width: 100%;
  flex: 1;
  transition: background 0.3s;
}

.field .hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Divider */
.calc-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 24px 0;
}

/* Results panel */
.results {
  background: var(--accent-light);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: none;
  animation: fadeUp 0.3s ease;
}
.results.visible { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.results h3 {
  font-family: var(--head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.result-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.result-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.result-value {
  font-family: var(--head);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
.result-value em {
  font-style: normal;
  font-size: 0.78rem;
  font-family: var(--mono);
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Calculate button */
.calc-btn {
  width: 100%;
  margin-top: 20px;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.calc-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.calc-btn:active { transform: translateY(0); }

/* Error */
.error-msg {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--danger);
  display: none;
}
.error-msg.visible { display: block; }

/* Info callout */
.info-box {
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.info-box strong {
  color: var(--text);
  font-family: var(--head);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

/* Syringe visual */
.syringe-visual {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.syringe-visual p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.syringe-track {
  height: 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  position: relative;
}
.syringe-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 9px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 0%;
}
.syringe-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ── Mobile h1 fix ── */
@media (max-width: 480px) {
  .page-header h1 {
    font-size: 1.6rem;
    letter-spacing: -0.01em;
  }
}

/* ── Endotoxin calculator ── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0 32px;
}
.endotoxin-info {
  background: var(--surface2);
  border-left: 3px solid var(--accent2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.endotoxin-info strong {
  color: var(--accent2);
  font-family: var(--head);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.endo-results {
  background: var(--accent-light);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: none;
  animation: fadeUp 0.3s ease;
}
.endo-results.visible { display: block; }
.endo-results h3 {
  font-family: var(--head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.endo-limit-bar {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.endo-limit-bar p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.endo-track {
  height: 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.endo-fill {
  height: 100%;
  border-radius: 9px;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 0%;
}
.endo-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.endo-warning {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--danger);
  display: none;
}
.endo-warning.visible { display: block; }
