/* Peptide calculator — interactive layout */
.calc-page-hero {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.calc-page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.calc-layout {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 960px) {
  .calc-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 1.5rem;
  }
}

.calc-card {
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.calc-card h2 {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.calc-field {
  margin-bottom: 1.35rem;
}

.calc-field:last-child {
  margin-bottom: 0;
}

.calc-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.calc-select {
  width: 100%;
  padding: 0.7rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.calc-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.calc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.calc-chip {
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-nav);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.calc-chip:hover {
  border-color: rgba(1, 126, 255, 0.35);
  color: var(--accent);
}

.calc-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(1, 126, 255, 0.28);
}

.calc-chip--syringe {
  flex: 1;
  min-width: calc(33% - 0.35rem);
  text-align: center;
  padding: 0.65rem 0.5rem;
}

.calc-chip--syringe small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.85;
}

.calc-custom {
  margin-top: 0.65rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.calc-custom.is-visible {
  display: flex;
}

.calc-custom input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.calc-custom span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.calc-slider-row {
  margin-top: 0.65rem;
}

.calc-slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 6px;
}

.calc-slider-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* —— Output panel —— */
.calc-output-card {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.calc-draw-hero {
  text-align: center;
  padding: 1.5rem 1rem 1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  margin-bottom: 0.75rem;
  transition: transform 0.2s ease;
}

.calc-draw-hero.is-updated {
  animation: calc-pulse 0.35s ease;
}

@keyframes calc-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.calc-draw-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.9;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.calc-draw-value {
  margin: 0.25rem 0;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.calc-draw-sub {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.92;
}

.text-accent {
  color: var(--accent);
}

.calc-syringe-stage {
  margin: 1.25rem 0 1rem;
  padding: 1.25rem 1rem 1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border: 1px solid rgba(1, 126, 255, 0.18);
}

.calc-syringe-stage__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.calc-syringe-stage__lead {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.calc-syringe-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 520px) {
  .calc-syringe-layout {
    grid-template-columns: minmax(200px, 1.1fr) 1fr;
    gap: 1rem 1.25rem;
  }
}

.calc-syringe-visual {
  display: flex;
  justify-content: center;
  padding: 0.5rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.calc-syringe {
  width: 100%;
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(1, 126, 255, 0.18));
}

.calc-syringe__fill {
  transition: y 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.calc-syringe__line {
  transition: y 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#syringeCallout {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
}

.calc-syringe-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.calc-syringe-steps li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.calc-syringe-steps__n {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.calc-syringe-steps strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.calc-syringe-steps p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.calc-syringe-summary {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed rgba(1, 126, 255, 0.35);
  font-size: 0.85rem;
  color: var(--text-nav);
  line-height: 1.5;
}

.calc-syringe-summary strong {
  color: var(--accent);
}

.calc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.calc-stat {
  padding: 0.85rem 0.5rem;
  text-align: center;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef4ff, #f8fafc);
  border: 1px solid rgba(1, 126, 255, 0.12);
}

.calc-stat strong {
  display: block;
  font-size: 1rem;
  color: var(--accent);
  line-height: 1.2;
}

.calc-stat span {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.calc-warning {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 0.8rem;
  color: #92400e;
  display: none;
}

.calc-warning.is-visible {
  display: block;
}

.calc-steps {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .calc-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .calc-tutorial .calc-steps {
    grid-template-columns: repeat(5, 1fr);
  }
}

.calc-tutorial {
  margin-top: 2rem;
}

.calc-tutorial .calc-step {
  display: flex;
  flex-direction: column;
}

.calc-tutorial .calc-step p {
  line-height: 1.5;
}

.calc-step {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.calc-step .num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.calc-step h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.calc-step p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.calc-faq {
  margin-top: 2rem;
}

@media (prefers-reduced-motion: reduce) {
  .calc-draw-hero.is-updated {
    animation: none;
  }
  .calc-syringe__fill,
  .calc-syringe__line {
    transition: none;
  }
}
