/* Packing Pending start page: the ZIP check, its Google map and the trial form. Colors, type,
   forms, the ZIP sign and the price sign come from site.css; this file holds what only /start/
   uses. */

[hidden] { display: none !important; }
/* For screen readers only: a heading to jump to, or a legend a summary already shows. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: .6rem .9rem; background: var(--charcoal); color: var(--white); border-radius: 4px; font-weight: 600; }
.skip:focus { top: 1rem; color: var(--white); }

/* Header: the logo and links back to the home page's sections */
.start-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; }
.start-nav { display: flex; gap: clamp(.85rem, 2.4vw, 1.75rem); font-size: .9375rem; font-weight: 600; }
.start-nav a { color: var(--charcoal); text-decoration: none; }
.start-nav a:hover { color: var(--red); text-decoration: underline; }

/* Hero: the title on the left, the ZIP sign on the right */
.start-hero { display: grid; gap: 1.5rem; margin-top: clamp(1rem, 4vw, 3rem); }
@media (min-width: 52rem) {
  .start-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); column-gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center; }
}
.start-hero h1 { max-width: 8em; font-size: clamp(2.6rem, 3.6vw + 1.5rem, 4.75rem); line-height: .94; letter-spacing: 0; }
.start-lead { margin-top: 1rem; max-width: 34rem; font-size: clamp(1.125rem, .45vw + 1rem, 1.375rem); line-height: 1.45; }
.start-hero .zip-sign { padding-bottom: 1.4rem; }
.start-area { margin-top: .8rem; padding-top: .75rem; border-top: 1px solid var(--tint); color: var(--muted); }

/* The result, under a heavy rule. On wider screens the map takes the left column and the
   numbers, price and trial the right. */
.result { scroll-margin-top: 1rem; margin-top: clamp(2.25rem, 5vw, 3.5rem); }
.result::before { content: ""; display: block; height: 3px; margin-bottom: clamp(1.25rem, 3vw, 2rem); background: var(--charcoal); }
.result-heading:focus { outline: none; }
.result-intro { margin-top: .6rem; max-width: 38rem; font-size: 1.125rem; }
.result-body { display: grid; gap: 2rem; margin-top: 1.75rem; }
@media (min-width: 60rem) {
  .result-body { grid-template-columns: minmax(0, 1fr) 21rem; grid-template-rows: auto 1fr; grid-template-areas: "picker numbers" "picker summary"; column-gap: clamp(2.5rem, 4vw, 3.5rem); row-gap: 2.25rem; align-items: start; }
  .numbers { grid-area: numbers; }
  .picker { grid-area: picker; }
  .result-summary { grid-area: summary; }
}
/* The summary follows a long checklist only when the open trial form still fits on screen. */
@media (min-width: 60rem) and (min-height: 56rem) { .result-summary { position: sticky; top: 1.5rem; } }

/* The estimated month, as a short sum: new listings − vacant = occupied */
.numbers-heading { font: 800 1.5rem/1.1 var(--condensed); letter-spacing: .005em; }
.numbers-basis { margin-top: .15rem; color: var(--muted); font-size: .9375rem; }
.figures { display: grid; grid-template-columns: auto auto minmax(0, 1fr); column-gap: .5rem; margin: .85rem 0 0; padding: 0; list-style: none; }
.figure { display: grid; grid-column: 1 / -1; grid-template-columns: 1.4rem 4.5rem minmax(0, 1fr); grid-template-columns: subgrid; align-items: baseline; padding: .15rem 0; }
.figure + .figure::before { content: "−"; content: "−" / ""; grid-column: 1; grid-row: 1; color: var(--field); font: 600 2.75rem/.95 var(--condensed); text-align: center; }
.figure.is-occupied { margin-top: .3rem; padding-top: .45rem; border-top: 2px solid var(--charcoal); }
.figure.is-occupied::before { content: "="; content: "=" / ""; }
.figure-num { grid-column: 2; grid-row: 1; font: 800 2.75rem/.95 var(--condensed); letter-spacing: .005em; text-align: right; }
.figure-label { grid-column: 3; grid-row: 1; padding-left: .35rem; font-size: .9375rem; font-weight: 600; line-height: 1.25; }
.is-unoccupied { color: var(--muted); }
.is-occupied { color: var(--red); }
.numbers-month { margin-top: .85rem; font: 600 1.35rem/1.2 var(--condensed); letter-spacing: .005em; }
.numbers-missing { margin-top: .3rem; color: var(--muted); font-size: .9375rem; }
.numbers-fine { margin-top: .75rem; color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.numbers-fine p + p { margin-top: .2rem; }

/* The map, framed like a sign panel. Google's logo and terms stay visible in its corners. */
.map { overflow: hidden; background: var(--tint); border: 3px solid var(--charcoal); border-radius: 6px; }
.map-canvas { position: relative; height: 26rem; }
@media (min-width: 40rem) { .map-canvas { height: 30rem; } }
@media (min-width: 60rem) { .map-canvas { height: 36rem; } }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.map-hint { min-height: 1.55em; margin-top: .65rem; font-weight: 600; }
.map-caption { color: var(--muted); font-size: .9375rem; }
.map-failed { padding: .8rem 1rem; background: var(--white); border-left: 4px solid var(--red); font-weight: 600; }
/* ZIP code labels on the map, drawn above the outlines. The pointer goes through them to the
   outline underneath. */
.map-labels { pointer-events: none; }
.map-label { position: absolute; transform: translate(-50%, -50%); color: var(--charcoal); font: 800 14px/1 var(--condensed); letter-spacing: .02em; white-space: nowrap; pointer-events: none; text-shadow: 0 0 2px #FFF, 0 0 2px #FFF, 0 0 3px #FFF, 0 0 4px #FFF; }
.map-labels.is-small .map-label { font-size: 12px; }
.map-label.is-out { color: var(--muted); font-weight: 600; }
.map-labels .map-label.is-typed { font-size: 17px; }
.map-labels.is-small .map-label.is-typed { font-size: 15px; }

/* The count of picked ZIP codes, with "Clear all" */
.picked { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1.25rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--tint); }
.map-failed + .picked { margin-top: .5rem; border-top: 0; }
.zip-count { font-weight: 600; }
.clear { padding: 0; background: none; border: 0; color: var(--red); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.clear:hover { color: var(--red-deep); }

/* The checklist: every covered ZIP code, nearest first, with the ones beyond the radius behind
   a second summary of their own */
.zip-details { margin-top: .9rem; }
.zip-details > summary { width: max-content; max-width: 100%; color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.zip-details > summary:hover { color: var(--red-deep); }
.zip-details[open] > summary { color: var(--charcoal); text-decoration: none; }
.zip-details-far { margin-top: 1.1rem; }
.zip-details-far .zip-group { margin-top: 0; }
.zip-group { min-width: 0; margin: 1.1rem 0 0; padding: 0; border: 0; }
.zip-group legend { padding: 0; font-weight: 600; }
.zip-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .5rem; margin-top: .6rem; }
.zip-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: .5rem; align-items: baseline; align-content: start; padding: .55rem .65rem .5rem; background: var(--white); border: 1px solid var(--tint); border-radius: 4px; cursor: pointer; }
.zip-option:hover { border-color: var(--field); }
.zip-option:has(input:checked) { background: var(--bone); border-color: var(--charcoal); box-shadow: inset 3px 0 0 var(--red); }
.zip-option input { align-self: center; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--red); }
.zip-code { font: 800 1.2rem/1.1 var(--condensed); letter-spacing: .02em; }
.zip-miles { font-size: .8125rem; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.zip-place { grid-column: 2 / 4; font-size: .875rem; line-height: 1.3; color: var(--muted); }

/* Price, trial and the mail add-on */
.result-summary { max-width: 24rem; }
.result-summary .sign { display: flex; justify-self: stretch; }
.result-summary .sign-panel { align-self: stretch; min-width: 0; }
.plan-note { margin-top: 1rem; color: var(--muted); font-size: .9375rem; }
.trial { margin-top: 1.4rem; }
.trial .button { display: block; width: 100%; text-align: center; font-size: 1.45rem; }
.trial .button:disabled { background: var(--field); cursor: not-allowed; }
.trial .fine { margin-top: .6rem; color: var(--muted); font-size: .9375rem; }
.trial .trial-next { margin-top: 1rem; }
.trial-panel { margin-top: 1.25rem; padding-top: .25rem; border-top: 1px solid var(--tint); }
.trial-panel .form-send { display: block; width: 100%; padding: 1rem 1.25rem .95rem; background: var(--red); font-size: 1.45rem; }
.trial-panel .form-send:hover { background: var(--red-deep); }

.addon { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--tint); }
.addon-estimate strong { font-weight: 600; }
.addon-option { display: flex; align-items: center; gap: .5rem; width: max-content; max-width: 100%; margin-top: .7rem; font-weight: 600; cursor: pointer; }
.addon-option input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--red); }
.addon-act { margin-top: .85rem; }
.addon-add { padding: .7rem 1.3rem .65rem; background: var(--charcoal); color: var(--white); border: 0; border-radius: 4px; font: 800 1.25rem/1 var(--condensed); letter-spacing: .02em; cursor: pointer; }
.addon-add:hover { background: #000; }
.addon-panel { margin-top: 1rem; }
.addon-panel h3 { font: 800 1.35rem/1.1 var(--condensed); letter-spacing: .005em; }
.addon-panel h3:focus { outline: none; }
.addon-panel > p { margin-top: .35rem; }
.addon-panel .form { margin-top: .5rem; }
.addon-panel .form-done { margin-top: 1rem; }

/* Waitlist for a ZIP code we don't cover */
.notify { max-width: 34rem; margin-top: 1.75rem; padding-top: 1.4rem; border-top: 1px solid var(--tint); }
.result-body[hidden] + .notify { margin-top: 1.25rem; padding-top: 0; border-top: 0; }
.notify .form label { margin-top: 0; }
.notify-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .35rem; }
.notify-row input { flex: 1 1 14rem; width: auto; margin-top: 0; }
.notify-row .form-send { flex: none; margin-top: 0; }

/* Avoid one-word last lines in headings and short paragraphs; older browsers ignore this. */
main p { text-wrap: pretty; }

@media (prefers-reduced-motion: no-preference) {
  .result:not([hidden]) { animation: result-in .28s ease-out; }
  .addon-panel:not([hidden]) { animation: result-in .25s ease-out; }
  @keyframes result-in { from { opacity: 0; transform: translateY(6px); } }
}
