/**
 * @l99/component: home-leak-teaser
 * source: original
 * license: internal
 * imported: 2026-11-18   adapted-by: Level99
 *
 * Homepage only: the hero's home-services line and the one-question
 * leak check that hands off to /home-services/. Kept out of
 * styles-hud.css so no other page needs a version bump.
 */

/* ---------- Hero note ---------- */
/* A handwritten note under the hero buttons, arrow down toward the leak
   check. Unlike marginalia it is a real link (keyboard and screen
   readers get "home services? price your missed calls"), so it turns
   pointer events back on and gets a visible focus ring. */
.hero__hs { margin: var(--space-4) 0 0; display: flex; justify-content: center; }
.hero__hs-note {
  align-items: center; gap: 8px; pointer-events: auto; text-decoration: none;
  font-size: var(--fs-6); --scrawl-rotate: -3deg; transition: color var(--dur) var(--ease);
}
.hero__hs-note .scrawl-arrow { margin-top: 0; }
.hero__hs-note:hover { color: var(--lime-bright); }
.hero__hs-note:focus-visible { outline: 2px solid var(--lime); outline-offset: 6px; border-radius: var(--r); }
@media (min-width: 960px) { .hero__hs-note { font-size: var(--fs-8); } }
.hero__hs-a { white-space: nowrap; }
/* Phones: question on one line, the ask and its arrow on the next. */
@media (max-width: 559px) {
  .hero__hs-note { display: block; text-align: center; }
  .hero__hs-q { display: block; }
  .hero__hs-a .scrawl-arrow { vertical-align: middle; margin-left: 4px; }
}

/* ---------- Leak check ---------- */
.leak-check { border-bottom: 1px solid var(--paper-line); }
.leak-check__grid { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) { .leak-check__grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-7); } }

.leak-check__form { margin-top: var(--space-5); }
.leak-check__form label {
  display: block; margin-bottom: var(--space-2);
  font-family: var(--font-display); font-stretch: var(--wdth-subhead); font-weight: 700;
  font-size: var(--fs-8); line-height: 1.25; color: var(--paper-ink);
}
.leak-check__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.leak-check__row input {
  width: 100%; max-width: 220px; min-height: 64px; padding: 8px 16px;
  font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--paper-ink);
  background: var(--paper-2); border: 2px solid var(--paper-ink); border-radius: var(--r);
}
.leak-check__row input:focus { outline: none; }
.leak-check__row input:focus-visible { outline: 2px solid var(--accent-paper); outline-offset: 3px; }
.leak-check__row input::-webkit-outer-spin-button,
.leak-check__row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.leak-check__row input { -moz-appearance: textfield; appearance: textfield; }
.leak-check__scrawl { align-items: center; --scrawl-rotate: -3deg; }
.leak-check__hint { margin: var(--space-3) 0 0; max-width: 52ch; font-size: var(--fs-3); line-height: var(--lh-snug); color: var(--paper-dim); }

/* The result: the same paper box as the full calculator. */
.leak-check__result.bnode {
  max-width: none; padding: var(--space-5); color: var(--paper-ink);
  font-size: var(--fs-5); line-height: var(--lh-snug); transform: rotate(-0.5deg);
}
.leak-check__who { margin: 0; font-size: var(--fs-3); font-weight: 600; color: var(--paper-ink); }
.leak-check__label { margin: var(--space-3) 0 0; font-size: var(--fs-2); color: var(--paper-dim); }
.leak-check__num {
  margin: 2px 0 var(--space-3); font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.75rem, 6vw, 4rem); line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--accent-paper);
}
.leak-check__units { margin: 0 0 var(--space-4); font-size: var(--fs-4); }
.leak-check__go { width: 100%; justify-content: center; min-height: 48px; }
@media (min-width: 560px) { .leak-check__go { width: auto; } }
.leak-check__trades { margin: var(--space-3) 0 0; font-size: var(--fs-3); color: var(--paper-dim); }
.leak-check__trades a { color: var(--accent-paper); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.leak-check__trades a:hover { color: var(--paper-ink); }
.leak-check__sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Phones: the scrawl drops under the field, so its arrow points up at it. */
@media (max-width: 559px) {
  .leak-check__row input { max-width: none; }
  .leak-check__scrawl .scrawl-arrow { --arrow-turn: 0deg; }
}
