.permeability{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"heading visual" "description visual";grid-template-rows:auto 1fr;gap:22px clamp(36px,6vw,90px);align-items:start;padding-block:48px;border-bottom:1px solid var(--rule);scroll-margin-top:100px}
.permeability-heading{grid-area:heading}
.permeability-heading .eyebrow{margin-bottom:17px}
.permeability-heading h2{max-width:520px;font-size:clamp(32px,3vw,44px);line-height:1.16}
.permeability-description{grid-area:description;font-size:12px;line-height:1.9;color:var(--muted);max-width:540px}
.permeability-figure{grid-area:visual;margin:0;max-width:520px;width:100%;justify-self:end;align-self:center}
.permeability-visual{display:block;width:100%;cursor:zoom-in;transition:opacity .2s}
.permeability-visual:hover{opacity:.94}
.permeability-image{display:block;width:100%;height:auto;object-fit:contain}
.permeability-figure figcaption{display:flex;justify-content:flex-end;padding-top:10px}
.permeability-figure .text-link{font-size:11px}
.permeability-dialog{width:calc(100vw - 48px);max-width:1540px;max-height:calc(100dvh - 48px);overflow-y:auto;overscroll-behavior:contain;background:var(--bg)}
.permeability-dialog .dialog-top{position:sticky;top:0;z-index:1;background:var(--bg);border-bottom:1px solid var(--rule);padding:12px 24px}
#permeability-dialog-title{font-size:14px;line-height:1.6}
.permeability-dialog-scroll{overflow:auto;overscroll-behavior-x:contain;padding:18px 24px;scrollbar-color:var(--orange) var(--surface)}
.permeability-dialog .permeability-image{min-width:900px}
.permeability-dialog-hint{padding:0 24px 22px;font-size:11px;line-height:1.8;color:var(--muted)}
@media(min-width:1000px){.permeability-dialog-hint{display:none}}
@media(max-width:900px){.permeability{grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:"heading" "visual" "description";gap:20px}.permeability-description{max-width:640px}.permeability-heading h2 br{display:none}.permeability-figure{max-width:400px;justify-self:center}}
@media(max-width:700px){.permeability{padding-block:32px;gap:17px}.permeability-heading .eyebrow{font-size:8px;margin-bottom:14px}.permeability-heading h2{font-size:32px;max-width:450px}.permeability-description{font-size:12px;line-height:1.85}.permeability-figure{max-width:300px}.permeability-figure figcaption{padding-top:5px}.permeability-figure .text-link{font-size:10px}.permeability-dialog{width:100vw;max-width:none;max-height:100dvh;margin:auto 0;border-inline:0}.permeability-dialog .dialog-top{padding:12px 16px;gap:16px}#permeability-dialog-title{font-size:12px}.permeability-dialog-scroll{padding:16px}.permeability-dialog-hint{padding:0 16px 18px;font-size:10px}}

.permeability-visual, .permeability-detail-visual { position: relative; }
.permeability-detail-visual { min-width: 900px; }
.water-traces {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cloud-rain {
  stroke: #96eaff;
  stroke-width: 2.25;
  stroke-dasharray: 7 19;
}
.cloud-rain path:nth-child(2) { --rain-phase: -.27s; stroke: #47c8ed; }
.cloud-rain path:nth-child(3) { --rain-phase: -.12s; stroke-width: 2.8; }
.cloud-rain path:nth-child(4) { --rain-phase: -.39s; stroke: #50cdec; }

.drain-streams {
  stroke: #a6fbff;
  stroke-width: 3.9;
  stroke-dasharray: 9 28;
}
.drain-streams path:nth-child(2) { --stream-phase: -.58s; }
.drain-streams .soil-stream {
  --stream-period: 1.45s;
  --stream-phase: -.34s;
  stroke: #5ee5fb;
  stroke-width: 3.25;
  stroke-dasharray: 6 31;
}
.drain-streams .soil-stream:last-child { --stream-phase: -.94s; }

@media (prefers-reduced-motion: no-preference) {
  .motion-ready:not(.motion-off) .diagram-loaded.flow-playing .water-traces { display: block; }
  .motion-ready:not(.motion-off) .diagram-loaded.flow-playing .cloud-rain path {
    animation: cloud-rain-fall .46s linear var(--rain-phase, 0s) infinite;
  }
  .motion-ready:not(.motion-off) .diagram-loaded.flow-playing .drain-streams path {
    animation: water-through-stone var(--stream-period, 1.05s) linear var(--stream-phase, 0s) infinite;
  }
}
/* Each cycle advances precisely one dash and gap so the flow loops seamlessly. */
@keyframes cloud-rain-fall { to { stroke-dashoffset: -26; } }
@keyframes water-through-stone { to { stroke-dashoffset: -37; } }
