/* "How many gallons is that leak?" tool. Shared by Montco, Bucks, and Phila Plumbers.
   Keep this file identical in Projects/regional-directory-site/public/tools-assets/ and
   phila-frontend/sites/private-preview/public/tools-assets/. */
.lg { --lg-band: #EBF1F7; --lg-surface: #fff; --lg-line: #E2E8F0; --lg-line-strong: #CBD5E1;
  --lg-text: #0F172A; --lg-muted: #475569; --lg-accent: var(--accent, #1558D6); --lg-accent-strong: var(--accent-strong, #0F45AA); --lg-accent-soft: var(--accent-soft, #E8F0FE); --lg-sky: #38BDF8;
  --lg-r: 16px; --lg-tap: 48px; color: var(--lg-text); }
.lg.lg *, .lg.lg *::before, .lg.lg *::after { box-sizing: border-box; }
.lg.lg button, .lg.lg input, .lg.lg select { font: inherit; }
.lg.lg [hidden] { display: none !important; }
.lg.lg .lg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lg.lg :focus-visible { outline: 3px solid var(--lg-sky); outline-offset: 2px; }
.lg.lg h2.lg-step { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; margin: 4px 0 12px; }
.lg.lg h2.lg-step span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lg-accent); color: #fff; font-size: 14px; flex: none; }
.lg.lg .lg-intro { font-size: 1rem; color: var(--lg-muted); margin: 0 0 12px; }
.lg.lg .lg-safety { background: #FFF4E5; border: 2px solid #F3C58B; border-left-width: 6px; border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.5; margin: 0 0 16px; }
.lg.lg .lg-safety b { color: #8A3B00; }
.lg.lg .lg-panel { background: var(--lg-surface); border: 1px solid var(--lg-line); border-radius: var(--lg-r); padding: 18px; margin: 16px 0; }
.lg.lg .lg-panel h2.lg-step:not(:first-child) { margin-top: 24px; }

.lg.lg .lg-leaks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .lg.lg .lg-leaks { grid-template-columns: repeat(5, 1fr); } }
.lg.lg .lg-leak { display: grid; justify-items: center; gap: 6px; min-height: 112px; padding: 12px 8px; border-radius: 14px; border: 2px solid var(--lg-line); background: var(--lg-surface); cursor: pointer; font-weight: 700; font-size: 14px; color: var(--lg-text); text-align: center; transition: border-color .15s, transform .15s, box-shadow .15s; }
.lg.lg .lg-leak svg { width: 56px; height: 56px; }
.lg.lg .lg-leak:hover { transform: translateY(-2px); }
.lg.lg .lg-leak.on { border-color: var(--lg-accent); background: var(--lg-accent-soft); box-shadow: 0 6px 18px rgba(15,23,42,.14); }
.lg.lg .lg-leak:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 640px) { .lg.lg .lg-leak:last-child:nth-child(odd) { grid-column: auto; } }
.lg.lg .lg-leak .d1, .lg.lg .lg-leak .d2 { animation: lg-drip 1.4s ease-in infinite; }
.lg.lg .lg-leak .d2 { animation-delay: .7s; }
.lg.lg .lg-leak .ripple { animation: lg-ripple 1.2s ease-in-out infinite; }
.lg.lg .lg-leak .spray { animation: lg-spray 1s linear infinite; }
@keyframes lg-drip { 0% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
@keyframes lg-ripple { 50% { transform: translateY(2px); } }
@keyframes lg-spray { to { stroke-dashoffset: -14; } }

.lg.lg .lg-opt { margin-top: 14px; }
.lg.lg .lg-opt[hidden] { display: none; }
.lg.lg .lg-opt-label { font-weight: 700; margin: 0 0 8px; }
.lg.lg .lg-hint { font-size: 14px; color: var(--lg-muted); margin: 8px 0 0; line-height: 1.5; }
.lg.lg .lg-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--lg-band); border-radius: 12px; padding: 5px; }
.lg.lg .lg-seg button { min-height: var(--lg-tap); border: 0; border-radius: 9px; background: transparent; font-weight: 700; cursor: pointer; color: var(--lg-text); padding: 6px 4px; line-height: 1.2; }
.lg.lg .lg-seg button small { display: block; font-weight: 500; font-size: 12px; color: var(--lg-muted); }
.lg.lg .lg-seg button.on { background: #fff; box-shadow: 0 2px 8px rgba(15,23,42,.12); color: var(--lg-accent); }
.lg.lg .lg-seg.lg-time button { white-space: nowrap; font-size: 15px; }
.lg.lg .lg-num { display: block; font-weight: 700; }
.lg.lg .lg-num input, .lg.lg .lg-num select { display: block; width: 100%; max-width: 320px; min-height: var(--lg-tap); margin-top: 6px; padding: 10px 12px; border: 1.5px solid var(--lg-line-strong); border-radius: 10px; font-size: 17px; background: #fff; color: var(--lg-text); }
.lg.lg .lg-rate-row { display: grid; gap: 12px; margin-top: 4px; }
@media (min-width: 640px) { .lg.lg .lg-rate-row { grid-template-columns: 1fr 1fr; } }

/* result stage */
.lg.lg .lg-stage { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 18px; border-radius: var(--lg-r); background: linear-gradient(180deg, #0B2545 0%, #13315C 100%); color: #fff; overflow: hidden; margin-top: 16px; }
@media (min-width: 760px) { .lg.lg .lg-stage { grid-template-columns: 260px 1fr; align-items: center; } }
.lg.lg .lg-pour { display: flex; align-items: center; gap: 12px; }
@media (min-width: 760px) { .lg.lg .lg-pour { flex-direction: column; } }
.lg.lg .lg-source { width: 120px; height: 150px; flex: none; }
.lg.lg .lg-source .fall { animation: lg-fall 0.9s ease-in infinite; }
.lg.lg .lg-source .fall.fast { animation-duration: .45s; }
.lg.lg .lg-source .stream { opacity: 0; }
.lg.lg .lg-source.is-stream .fall { display: none; }
.lg.lg .lg-source.is-stream .stream { opacity: 1; }
.lg.lg .lg-source .stream .flow { stroke-dasharray: 6 5; animation: lg-flow .35s linear infinite; }
.lg.lg .lg-source .splash { animation: lg-splash .6s ease-out infinite; transform-origin: 77px 92px; }
@keyframes lg-fall { 0% { transform: translateY(-8px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(38px); opacity: 0; } }
@keyframes lg-flow { to { stroke-dashoffset: -11; } }
@keyframes lg-splash { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.3); } }
.lg.lg .lg-source .wave { animation: lg-wave 1.6s linear infinite; }
@keyframes lg-wave { to { transform: translateX(20px); } }
.lg.lg .lg-count .big { display: block; font-weight: 800; font-size: clamp(2.4rem, 11vw, 3.4rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #fff; }
.lg.lg .lg-count .unit { color: #BAE6FD; font-weight: 600; }
.lg.lg .lg-grid-box { min-width: 0; }
.lg.lg .lg-legend { font-size: 14px; color: #BAE6FD; display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.lg.lg .lg-legend svg { color: #7DD3FC; }
.lg.lg .lg-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.lg.lg .lg-grid .g { position: relative; aspect-ratio: 40/48; opacity: 0; transform: translateY(-14px) scale(.8); }
.lg.lg .lg-grid .g.in { animation: lg-pop .32s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes lg-pop { to { opacity: 1; transform: none; } }
.lg.lg .lg-grid .g svg { width: 100%; height: 100%; display: block; }
@media (prefers-reduced-motion: reduce) { .lg.lg .lg-grid .g { opacity: 1; transform: none; } .lg.lg .lg-grid .g.in { animation: none; } .lg.lg .lg-leak *, .lg.lg .lg-source * { animation: none !important; } }

.lg.lg .lg-facts { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
@media (min-width: 700px) { .lg.lg .lg-facts { grid-template-columns: repeat(3, 1fr); } }
.lg.lg .lg-fact { background: var(--lg-surface); border: 1px solid var(--lg-line); border-radius: 14px; padding: 14px 16px; }
.lg.lg .lg-fact p { margin: 0; }
.lg.lg .lg-fact-k { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--lg-muted); margin-bottom: 4px !important; }
.lg.lg .lg-fact-v { font-weight: 800; font-size: 1.8rem; line-height: 1.1; color: var(--lg-accent); margin-bottom: 4px !important; font-variant-numeric: tabular-nums; }
.lg.lg .lg-fact-s { font-size: 13px; color: var(--lg-muted); line-height: 1.45; }

.lg.lg .lg-steps { padding-left: 20px; margin: 0 0 14px; }
.lg.lg .lg-steps li { margin-bottom: 10px; }
.lg.lg .lg-src { display: inline-block; font-size: 12px; font-weight: 600; color: var(--lg-muted); background: var(--lg-band); border-radius: 99px; padding: 1px 8px; margin-left: 4px; }
.lg.lg .lg-cta { display: flex; align-items: center; justify-content: center; min-height: var(--lg-tap); padding: 12px 18px; border-radius: 12px; background: var(--grad-accent, var(--lg-accent)); font-weight: 700; text-decoration: none; }
.lg.lg a.lg-cta, .lg.lg a.lg-cta:visited, html[data-site] .lg a.lg-cta, html[data-site] .lg a.lg-cta:visited { color: #fff !important; text-decoration: none !important; }
.lg.lg a.lg-cta:hover { filter: brightness(1.06); }
.lg.lg details.lg-sources summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.lg.lg details.lg-sources ul { padding-left: 18px; margin: 12px 0 0; font-size: 14px; color: var(--lg-muted); }
.lg.lg details.lg-sources li { margin-bottom: 8px; }
.lg.lg .lg-stage .lg-legend span, .lg.lg .lg-stage .lg-legend b { color: inherit; }
.lg.lg .lg-stage .lg-count .unit { color: #BAE6FD; }
