/* How We Keep Them: the margin rule, a slow water-level down the left margin of the six rules. */

.opening .statement {
  font-size: clamp(2.5rem, 1.2rem + 4vw, 5.25rem);
  line-height: .98;
  letter-spacing: -.025em;
}
.opening .statement + .lede { margin-top: clamp(1.25rem, 3vh, 2rem); }
.opening .lede + .label { margin-top: clamp(2rem, 6vh, 3.5rem); }

/* The rules sit in one wrapper so the margin rule can run its whole length. */
.rules { position: relative; }

/* Lives in the left margin only; tanks keep text at or beyond var(--gut). */
.margin-rule {
  position: absolute; top: 0; bottom: 0; left: calc(var(--gut) * .5);
  width: var(--hair); z-index: 2; pointer-events: none;
  background: color-mix(in srgb, var(--teal) 32%, transparent);
}
.margin-rule-fill {
  position: absolute; inset: 0; background: var(--teal-lit);
  box-shadow: 0 0 .75rem color-mix(in srgb, var(--teal) 70%, transparent);
  transform-origin: 50% 0;
  transform: scaleY(var(--fill, 1));
}

/* One rule, one screen. Copy rests mid-water in no more than five columns. */
.rule .col-text { padding-block: clamp(1rem, 3vh, 2rem); }
.rule .title { max-width: 14ch; }
.rule p:not(.rule-no) { max-width: 30rem; }
.rule-no {
  font-family: var(--serif); font-size: var(--t-sub); line-height: 1;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: .02em; color: var(--ink);
  transition: color .6s var(--ease);
}
.js .rule-no { color: color-mix(in srgb, var(--teal) 70%, var(--ink-dim) 30%); }
.js .rule.is-read .rule-no { color: var(--ink); }
.rule .title { margin-top: 1rem; }
.rule .title + p { margin-top: 1.5rem; }

/* The valve: the page's one photograph, set between rules four and five. */
.valve { min-height: 0; }
.valve .tank-body { margin-top: clamp(1.5rem, 4vh, 3rem); }
.valve-pic { margin: 0; }
.valve-pic .cap { max-width: 30rem; }
@media (min-width: 56rem) {
  .valve-pic { grid-column: 1 / span 8; }
}

/* The close: the address and a plain invitation. */
.ask { min-height: 0; padding-bottom: clamp(4rem, 12vh, 8rem); }
.ask-addr span { display: block; font-size: var(--t-lede); line-height: 1.45; }
.ask-addr { margin-top: clamp(1.5rem, 4vh, 2.25rem); }
.ask .action { margin-top: .5rem; }
.ask .title + .lede { margin-top: 1.25rem; }

@media (max-width: 40rem) {
  .rule .title { max-width: none; }
}
