/* Inmersiva: visual layer for the local calculator draft. The chemical engine is unchanged. */
#psm-calculator {
  --navy: #061b35;
  --ink: #eafaff;
  --teal: #8ff0eb;
  --aqua: #75e5e8;
  --line: rgba(174, 241, 247, .25);
  --muted: #b8d8e2;
  --paper: #061b35;
  color: #eafaff;
  background: #061b35;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(2, 17, 38, .28);
}
#psm-calculator .hero {
  isolation: isolate;
  background: radial-gradient(circle at 50% 88%, #0b6b89 0%, #0a3d5e 33%, #071f3f 68%, #04162e 100%);
}
#psm-calculator .hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 740px;
  height: 740px;
  left: 50%;
  top: -330px;
  transform: translateX(-50%);
  border: 1px solid rgba(180, 248, 251, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 75px rgba(109, 237, 243, .035), 0 0 0 155px rgba(109, 237, 243, .025), 0 0 0 245px rgba(109, 237, 243, .015);
  pointer-events: none;
}
#psm-calculator .hero-grid { display: block; min-height: 0; padding: 26px 0 25px; }
#psm-calculator .hero-inner { max-width: 850px; margin: 0 auto; text-align: center; }
#psm-calculator .hero .eyebrow { margin-bottom: 12px; color: #8af2f0; font-size: 12px; letter-spacing: .2em; }
#psm-calculator h1 { font-size: clamp(39px, 5.2vw, 62px); line-height: .99; letter-spacing: -.055em; font-weight: 800; text-transform: uppercase; }
#psm-calculator h1 span { display: block; color: #a3f3f2; }
#psm-calculator .hero-copy { max-width: 630px; margin: 10px auto 0; color: #d1edf2; font-size: 15px; line-height: 1.55; }
#psm-calculator .hero-meta { justify-content: center; margin-top: 8px; color: #afd8e1; font-size: 12px; }
#psm-calculator .hero-actions { justify-content: center; margin-top: 12px; }
#psm-calculator .hero-actions a { border-radius: 10px; background: #f1d078; color: #072745; font-size: 13px; font-weight: 800; box-shadow: 0 8px 24px rgba(1, 10, 33, .24); }
#psm-calculator .hero-actions a:hover { background: #ffe39a; }
#psm-calculator .hero-actions a+a { border: 1px solid rgba(168, 239, 246, .5); background: rgba(12, 63, 90, .62); color: #e9fbff; box-shadow: none; }
#psm-calculator .hero-actions a+a:hover { background: rgba(29, 98, 120, .76); }
#psm-calculator .workspace { position: relative; padding: 28px 0 50px; background: radial-gradient(circle at 27% 16%, rgba(12, 110, 149, .34), transparent 35%), radial-gradient(circle at 88% 60%, rgba(41, 170, 182, .13), transparent 34%), linear-gradient(180deg, #071e3c 0%, #06162e 100%); }
#psm-calculator .workspace::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .28; background-image: radial-gradient(rgba(143, 224, 233, .34) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(180deg, #000, transparent 60%); }
#psm-calculator .workspace > * { position: relative; }
#psm-calculator .intro-line { margin-bottom: 22px; color: #e9fbff; }
#psm-calculator .intro-line h2 { font-size: 22px; font-weight: 700; }
#psm-calculator .intro-line > span { color: #b7dce4; font-size: 13px; }
#psm-calculator .calc-grid { grid-template-columns: minmax(300px, .92fr) minmax(0, 1.45fr); gap: 21px; }
#psm-calculator .result-column { order: -1; top: 16px; }
#psm-calculator .input-card, #psm-calculator .result-card {
  border: 1px solid rgba(174, 241, 247, .38);
  border-radius: 24px;
  background: linear-gradient(140deg, rgba(139, 219, 230, .16), rgba(8, 39, 69, .8) 56%, rgba(5, 27, 52, .93));
  box-shadow: 0 17px 52px rgba(0, 9, 31, .28);
  backdrop-filter: blur(13px);
  color: #eafaff;
}
#psm-calculator .input-card { order: 1; }
#psm-calculator .form-section { padding: 26px 27px; border-bottom: 1px solid rgba(182, 243, 249, .23); }
#psm-calculator .section-heading { margin-bottom: 18px; }
#psm-calculator .section-heading h3 { color: #f5feff; font-size: 20px; font-weight: 700; }
#psm-calculator .section-heading p { color: #b8d9e1; font-size: 13px; }
#psm-calculator .step { width: 35px; height: 35px; border-color: rgba(140, 238, 238, .59); background: rgba(91, 220, 227, .13); color: #b1f5f1; font-weight: 800; }
#psm-calculator .required { color: #f8d77d; }
#psm-calculator .input-card label, #psm-calculator .input-card .field-label { color: #e3f7fb; }
#psm-calculator .input-card small, #psm-calculator .input-card .field small { color: #b8d9e1; }
#psm-calculator .input-card input, #psm-calculator .input-card select {
  border: 1px solid rgba(178, 236, 244, .45);
  border-radius: 9px;
  background: rgba(1, 22, 47, .71);
  color: #f3fdff;
  font-weight: 600;
}
#psm-calculator .input-card select option { background: #0b2e4c; color: #f3fdff; }
#psm-calculator .input-card input::placeholder { color: #a2c0cc; font-weight: 400; }
#psm-calculator .input-card input:focus, #psm-calculator .input-card select:focus { border-color: #8af3ed; box-shadow: 0 0 0 3px rgba(91, 225, 224, .17); }
#psm-calculator .input-card .input-unit input { border-radius: 9px 0 0 9px; border-right: 0; }
#psm-calculator .input-card .input-unit select, #psm-calculator .input-card .input-unit > span { border-radius: 0 9px 9px 0; background: #16445d; color: #d8f3f5; border-color: rgba(178, 236, 244, .45); }
#psm-calculator .input-card .input-unit > span { border-left: 0; }
#psm-calculator .text-button { color: #a9f2ef; font-weight: 700; }
#psm-calculator .text-button:hover { color: #fff2b5; }
#psm-calculator .estimator, #psm-calculator .technical-details, #psm-calculator .field-info, #psm-calculator .reference-summary {
  border: 1px solid rgba(154, 228, 235, .25);
  border-radius: 10px;
  background: rgba(10, 51, 77, .78);
  color: #d5edf1;
}
#psm-calculator .estimator h4, #psm-calculator .technical-details summary, #psm-calculator .reference-summary strong, #psm-calculator .field-info strong { color: #eafaff; }
#psm-calculator .estimator > p, #psm-calculator .demand-note { color: #c4dfe7; }
#psm-calculator .secondary-button { border-color: #91d7dc; border-radius: 9px; background: #164860; color: #e9fbff; }
#psm-calculator .secondary-button:hover { background: #205d73; }
#psm-calculator .parameter-grid { gap: 9px; }
#psm-calculator .parameter-choice, #psm-calculator .module {
  border: 1px solid rgba(167, 230, 238, .31);
  border-radius: 11px;
  background: rgba(4, 33, 59, .73);
  color: #e4f7f9;
}
#psm-calculator .parameter-choice:hover, #psm-calculator .module:hover { background: rgba(37, 103, 124, .77); }
#psm-calculator .parameter-choice.active, #psm-calculator .module.active { border-color: #8df0e9; background: rgba(41, 148, 161, .4); box-shadow: inset 0 0 0 1px #8df0e9, 0 0 19px rgba(109, 236, 233, .11); color: #fff; }
#psm-calculator .parameter-symbol { background: rgba(149, 234, 239, .16); color: #b5f7f0; }
#psm-calculator .parameter-choice.active .parameter-symbol { background: #96e9e9; color: #072b47; }
#psm-calculator .parameter-choice small, #psm-calculator .module-detail, #psm-calculator .module.active .module-detail { color: #c2e0e6; }
#psm-calculator #product-chooser { border-top-color: rgba(182, 243, 249, .24); }
#psm-calculator .product-chooser-title, #psm-calculator .ph-availability { color: #d3eef0; }
#psm-calculator .fixed-value { color: #f9de8b; }
#psm-calculator .calculate-button { border-radius: 11px; background: #f2d077; color: #072b48; font-size: 15px; font-weight: 800; box-shadow: 0 9px 27px rgba(0, 12, 33, .28); }
#psm-calculator .calculate-button:hover { background: #ffe29a; }
#psm-calculator .calculation-footnote { color: #bcdce2; }
#psm-calculator .confirm-label { color: #d5eef0; }
#psm-calculator .confirm-label input { accent-color: #79e6e4; }
#psm-calculator .inline-error, #psm-calculator .field #volume-error { color: #ffd8c8; }
#psm-calculator .input-unit #volume[aria-invalid="true"] { border-color: #ff9b82; }
#psm-calculator .error-box { border-color: rgba(255, 173, 145, .52); background: #482e3d; color: #ffe1d5; }
#psm-calculator .field-error { color: #ffd8c8 !important; }

/* Live volume orb and result. */
#psm-calculator .result-card { padding: 23px 24px 25px; }
#psm-calculator .result-top { padding-bottom: 13px; border-bottom-color: rgba(184, 246, 249, .25); }
#psm-calculator .result-top .eyebrow { color: #d2f9f6; font-size: 11px; }
#psm-calculator .local-badge { border: 1px solid rgba(156, 238, 236, .36); border-radius: 999px; color: #b7f4ed; font-size: 10px; }
#psm-calculator .local-badge > span { background: #8cf2e7; }
#psm-calculator .orb-zone { position: relative; display: grid; place-items: center; min-height: 296px; margin: 15px 0 7px; }
#psm-calculator .water-orb { position: relative; display: grid; place-items: center; width: min(256px, 83%); aspect-ratio: 1; border: 1px solid rgba(192, 253, 255, .65); border-radius: 50%; background: radial-gradient(circle at 28% 19%, rgba(236, 255, 255, .88), rgba(101, 232, 238, .28) 18%, rgba(8, 140, 181, .62) 42%, rgba(3, 34, 80, .92) 73%), repeating-radial-gradient(ellipse at 50% 100%, transparent 0 11px, rgba(211, 255, 255, .21) 12px 14px); box-shadow: inset -15px -24px 44px rgba(0, 8, 37, .7), inset 5px 7px 27px rgba(202, 255, 255, .66), 0 0 0 9px rgba(96, 232, 239, .08), 0 19px 49px rgba(0, 4, 25, .5), 0 0 94px rgba(45, 218, 228, .19); }
#psm-calculator .water-orb::after { content: ""; position: absolute; inset: 15px; border: 1px solid rgba(235, 255, 255, .23); border-radius: 50%; }
#psm-calculator .water-orb-copy { position: relative; z-index: 1; text-align: center; text-shadow: 0 2px 16px #062b4b; }
#psm-calculator .water-orb-copy > span { display: block; color: #dafaff; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
#psm-calculator #orb-volume-value { display: inline-block; margin-top: 5px; font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.07em; }
#psm-calculator #orb-volume-value.is-long { font-size: 36px; letter-spacing: -.05em; }
#psm-calculator .water-orb-copy em { margin-left: 5px; color: #e0faff; font-size: 20px; font-style: normal; }
#psm-calculator .orbit-tag { position: absolute; z-index: 2; padding: 8px 11px; border: 1px solid rgba(176, 250, 255, .39); border-radius: 999px; background: #0a3250; box-shadow: 0 7px 20px rgba(0, 4, 22, .25); color: #e6fbff; font-size: 11px; font-weight: 800; white-space: nowrap; }
#psm-calculator .orbit-tag-volume { left: 0; top: 52px; transform: rotate(-7deg); }
#psm-calculator .orbit-tag-readings { right: 0; bottom: 48px; transform: rotate(6deg); }
#psm-calculator #result-empty { display: block; padding: 5px 6px 0; text-align: center; }
#psm-calculator #result-empty .empty-icon, #psm-calculator .empty-checklist { display: none; }
#psm-calculator #result-empty h3 { color: #f6fdff; font-size: 22px; font-weight: 700; }
#psm-calculator #result-empty > p { max-width: 330px; margin: 10px auto 0; color: #c3e1e7; font-size: 13px; line-height: 1.6; }
#psm-calculator #result-content { color: #eafaff; }
#psm-calculator .result-subheading { color: #aaf2ed; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
#psm-calculator .result-product { margin-top: 5px; color: #f9feff; font-size: 18px; }
#psm-calculator .result-measurement { margin-top: 5px; color: #bedfe7; font-size: 13px; }
#psm-calculator .result-number { margin-top: 9px; color: #f8dc87; font-size: clamp(38px, 4.5vw, 54px); font-weight: 800; }
#psm-calculator .result-number span { color: #ffeaa8; }
#psm-calculator .result-equivalent { color: #bfdfe5; font-size: 12px; }
#psm-calculator .result-disclaimer, #psm-calculator .result-warning { border-color: rgba(222, 238, 189, .28); border-radius: 9px; background: rgba(195, 151, 56, .15); color: #f5e6bb; }
#psm-calculator .result-caution, #psm-calculator .formula-display { color: #d4e9ec; }
#psm-calculator .result-details { border-top-color: rgba(190, 242, 246, .22); }
#psm-calculator .result-details summary { color: #c6f4f2; }
#psm-calculator .result-facts > div { border-bottom-color: rgba(187, 234, 240, .2); }
#psm-calculator .result-facts dt { color: #b4d8e0; }
#psm-calculator .result-facts dd { color: #f3fdff; }
#psm-calculator .result-presentation { color: #d9eef1; }
#psm-calculator .safety-card { border: 1px solid rgba(235, 209, 139, .32); border-radius: 14px; background: rgba(124, 98, 41, .15); color: #f7edcd; }
#psm-calculator .safety-heading svg { color: #f3d581; }
#psm-calculator .safety-heading h3 { color: #fff4d2; }
#psm-calculator .safety-card ul { color: #e9dfc2; }

/* Technical sections remain readable while retaining the visual identity. */
#psm-calculator .saturation-section, #psm-calculator .method-section { border: 1px solid #d6e9e9; border-radius: 19px; background: #f7fbf9; box-shadow: 0 13px 35px rgba(0, 9, 31, .13); color: #153e54; }
#psm-calculator .saturation-section { margin-top: 35px; padding: 27px; }
#psm-calculator .saturation-section .intro-line h2, #psm-calculator .method-section h2 { color: #123d56; }
#psm-calculator .saturation-section p, #psm-calculator .saturation-section label, #psm-calculator .saturation-section small { color: #3c6573; }
#psm-calculator .saturation-section input, #psm-calculator .saturation-section select { border-color: #bed4d9; background: #fff; color: #143e55; }
#psm-calculator .saturation-section .field-info { border-color: #d1e3e7; background: #edf5f6; color: #345766; }
#psm-calculator .saturation-section .confirm-label span { color: #426c78; }
#psm-calculator .saturation-section .secondary-button { border-color: #84bdc7; background: #0a667d; color: #fff; }
#psm-calculator .saturation-section .secondary-button:hover { background: #08546b; }
#psm-calculator .saturation-section #saturation-status { color: #315365; }
#psm-calculator .saturation-section #saturation-status.is-result { color: var(--is-ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
#psm-calculator .saturation-section #saturation-status.is-result p,
#psm-calculator .saturation-section #saturation-status.is-result summary { color: var(--is-ink); }
#psm-calculator .saturation-section #saturation-status.is-result .is-value { color: var(--is-strong); }
#psm-calculator .saturation-section #saturation-status.is-undersaturated { --is-ink: #692934; --is-strong: #a9233b; }
#psm-calculator .saturation-section #saturation-status.is-scale-tendency { --is-ink: #174a79; --is-strong: #07599c; }
#psm-calculator .saturation-section #saturation-status.is-within-reference-band { --is-ink: #235943; --is-strong: #107047; }
#psm-calculator .method-section { margin: 24px 0 0; padding: 28px; }
#psm-calculator .method-section .eyebrow { color: #0a7787; }
#psm-calculator .method-section > div > p:last-child, #psm-calculator .method-section .details-content { color: #466b78; }
#psm-calculator .method-section summary { color: #16475c; }
#psm-calculator .method-section details { border-bottom-color: #d9e8e8; }

@keyframes psm-orb-float { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: no-preference) { #psm-calculator .water-orb { animation: psm-orb-float 7s ease-in-out infinite; } }
@media (max-width: 960px) {
  #psm-calculator .calc-grid { grid-template-columns: minmax(280px, .94fr) minmax(0, 1.35fr); gap: 16px; }
  #psm-calculator .form-section { padding: 22px; }
  #psm-calculator .result-card { padding: 21px; }
}
@media (max-width: 700px) {
  #psm-calculator { border-radius: 0; }
  #psm-calculator .hero-grid { padding: 38px 0 34px; }
  #psm-calculator .hero .eyebrow { font-size: 10px; }
  #psm-calculator h1 { font-size: clamp(36px, 9vw, 54px); }
  #psm-calculator .hero-copy { font-size: 14px; }
  #psm-calculator .hero-meta { font-size: 11px; }
  #psm-calculator .workspace { padding-top: 25px; }
  #psm-calculator .calc-grid { grid-template-columns: 1fr; gap: 17px; }
  #psm-calculator .input-card { order: 0; }
  #psm-calculator .result-column { order: 1; position: static; }
  #psm-calculator .volume-row { display: block; }
  #psm-calculator .estimator-toggle { max-width: none; margin-top: 8px; font-size: 13px; }
  #psm-calculator .result-card { padding: 21px; }
  #psm-calculator .orb-zone { min-height: 270px; }
  #psm-calculator .water-orb { width: 238px; }
  #psm-calculator #result-empty { display: block; text-align: center; }
  #psm-calculator #result-empty > p { font-size: 13px; }
  #psm-calculator .saturation-section, #psm-calculator .method-section { padding: 21px; }
  #psm-calculator .method-section { display: block; }
  #psm-calculator .method-accordions { margin-top: 20px; }
}
@media (max-width: 390px) {
  #psm-calculator .hero .eyebrow { letter-spacing: .12em; }
  #psm-calculator h1 { font-size: 35px; }
  #psm-calculator .hero-actions a { width: 100%; }
  #psm-calculator .form-section { padding: 20px 17px; }
  #psm-calculator .water-orb { width: 210px; }
  #psm-calculator .orb-zone { min-height: 248px; }
  #psm-calculator .orbit-tag { font-size: 10px; padding: 7px 9px; }
}
