/* Calculadora de cloro y pH — se carga después de landing.css */
.calc-section { padding: clamp(28px, 4vw, 48px) 0 0; }
.calc-noscript { max-width: 960px; margin: 0 auto 20px; padding: 14px 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }

.calc-card {
  max-width: 960px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
}
.calc-form { padding: clamp(20px, 3.5vw, 32px); display: grid; gap: 20px; align-content: start; }
.calc-card [hidden] { display: none !important; }
.mode-panel { display: grid; gap: 18px; }
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-row-3 { grid-template-columns: repeat(3, 1fr); }
.calc-row-3:has(> [hidden]) { grid-template-columns: 1fr 1fr; }
.field-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.calc-form .hint { margin-top: -8px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.calc-form .field .hint { margin-top: 0; }

.input-unit { position: relative; }
.field .input-unit input { padding-right: 58px; }
.input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; font-weight: 600; color: var(--muted); pointer-events: none; }

/* Botones segmentados (radios) */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--line-2); }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; height: 42px; padding: 0 10px; border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--muted); transition: background-color .2s, color .2s, box-shadow .2s; white-space: nowrap;
}
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 2px solid var(--aqua-400); outline-offset: 2px; }
.seg-mode span { height: 48px; font-size: 16.5px; }
.seg-mode input:checked + span { background: linear-gradient(135deg, var(--aqua-600), var(--deep-500)); color: #fff; }
.seg-sm span { height: 36px; font-size: 14px; }

.vol-helper { margin-top: 2px; }
.vol-helper summary { cursor: pointer; width: fit-content; font-size: 13.5px; font-weight: 600; color: var(--aqua-600); }
.vol-helper summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.vol-body { margin-top: 12px; padding: 14px; display: grid; gap: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.vol-body .field input { background: #fff; height: 46px; }
.vol-out { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--ink-3); }

/* Resultado */
.calc-out { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(24px, 3.5vw, 36px); background: var(--bg); border-left: 1px solid var(--line); }
.out { display: grid; gap: 8px; min-height: 150px; align-content: center; padding: 24px; border-radius: 20px; transition: background-color .25s; }
.out.is-empty { background: #fff; border: 1.5px dashed var(--line); }
.out.is-ok { background: var(--success-bg); border: 1px solid #c8eadb; }
.out.is-dose { color: #fff; background: var(--brand-gradient); box-shadow: var(--shadow); }
.out-msg { font-size: 15px; line-height: 1.55; color: var(--muted); text-align: center; }
.out-title { font-family: var(--font-display); font-size: 21px; font-weight: 600; color: #1f7a5f; }
.out-big { font-family: var(--font-display); font-size: clamp(44px, 6vw, 60px); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.out-big small { font-size: .45em; font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, .78); }
.out-what { font-size: 16px; font-weight: 500; color: rgba(255, 255, 255, .9); }
.out-tip { margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .8); }
.out.is-ok .out-tip { border-top-color: #c8eadb; color: var(--ink-3); }
.out-note { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.out-note .icon { color: var(--orange); margin-top: 1px; }

/* Contenido */
.calc-content { padding: clamp(48px, 7vw, 88px) 0; }
.calc-content .legal-doc ol { list-style: decimal; padding-left: 22px; margin: 10px 0; }
.calc-content .legal-doc ol li + li { margin-top: 6px; }
.calc-content .formula { margin: 14px 0; padding: 14px 18px; border-radius: 12px; background: var(--bg); border-left: 3px solid var(--aqua-400); font-weight: 600; color: var(--ink); }
.calc-content .table-wrap table { min-width: 520px; }
.calc-content .table-wrap tbody th { font-weight: 600; color: var(--ink); background: transparent; }
.calc-content .calc-faq { display: grid; gap: 10px; margin-top: 14px; }
.calc-content .calc-faq details { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.calc-content .calc-faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--ink); }
.calc-content .calc-faq details p { padding: 0 18px 16px; margin: 0; }

@media (max-width: 820px) {
  .calc-card { grid-template-columns: 1fr; }
  .calc-out { border-left: 0; border-top: 1px solid var(--line); }
  .out { min-height: 0; }
}
@media (max-width: 420px) {
  .calc-row-3 { grid-template-columns: 1fr 1fr; }
  .calc-row-3 > .field:last-child { grid-column: 1 / -1; }
  .seg span { font-size: 14px; padding: 0 6px; }
}
