/* Ingress, Measure my roof: visual finish pass two, 11 November 2026.
   Loaded after ingress.css, ingress-build.css and ingress-finish.css; none of those changes.
   Same rules: IBM Plex Sans, the 12-column grid and 8px scale, no icons, no shadows, no rounded
   corners, no gradients, the accent once per screen (the outlines on Choose and Result; the
   Measure my roof button on the entry page). */

:root {
  --control-large: 72px;      /* the address field and its button on the entry page */
  --outline-halo: #FFFFFF;    /* a 2px paper line under each outline so it reads on a pale roof */
}

/* ---------- Entry: the field is the hero ---------- */
.m-hero { position: relative; overflow: hidden; background: var(--ink); }
.m-hero-photo { height: 640px; }
.m-hero-photo picture, .m-hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.m-hero-panels { position: absolute; left: 0; right: 0; bottom: 0; }
.m-hero-box { position: relative; grid-column: 1 / span 9; padding: var(--space-5) var(--space-5) var(--space-5) 0; background: var(--ink); color: var(--ground); }
.m-hero-box::before { content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 100vw; background: var(--ink); }
.m-hero-box .t-label { color: var(--ground-muted); margin-bottom: var(--space-2); }
.m-entry { margin-top: var(--space-4); }
.m-entry label { display: block; margin-bottom: var(--space-1); font-size: var(--caption-size); line-height: var(--caption-line); font-weight: 500; color: var(--ground); }
.m-entry-row { display: grid; grid-template-columns: 1fr auto; gap: 0; }
.m-entry input { width: 100%; height: var(--control-large); padding: 0 var(--space-3); border: 1px solid var(--ground); border-right: 0; border-radius: 0; background: var(--ground); color: var(--ink); font: inherit; font-size: var(--title-size); -webkit-appearance: none; appearance: none; }
.m-entry input:focus-visible { outline: 2px solid var(--ground); outline-offset: 2px; }
.m-entry input[aria-invalid="true"] { border-color: var(--ink); box-shadow: none; }
.m-entry .help { margin: var(--space-1) 0 0; font-size: var(--caption-size); line-height: var(--caption-line); color: var(--ground); }
.btn-accent-l { height: var(--control-large); padding: 0 var(--space-5); border: 1px solid var(--accent); border-radius: 0; background: var(--accent); color: var(--ground); font: inherit; font-size: 18px; line-height: 24px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn-accent-l:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-accent-l:focus-visible { outline: 2px solid var(--ground); outline-offset: 2px; }

/* Below the fold on the entry page: the paragraph, then the budget-band note, then How it works */
.m-explain { padding-top: var(--space-8); row-gap: var(--space-5); align-items: start; }
.m-explain .m-para { grid-column: 1 / span 7; margin: 0; font-size: var(--title-size); line-height: var(--title-line); }
.m-explain .m-note { grid-column: 9 / span 4; margin: 0; padding-left: var(--space-3); border-left: 4px solid var(--ink); }

/* ---------- Choose: the aerial as large as the width allows, the list beside it ---------- */
.m-choose { margin-top: var(--space-4); row-gap: var(--space-4); align-items: start; }
.m-aerial-fig { position: relative; grid-column: 1 / span 8; margin: 0 0 0 calc(-1 * var(--margin)); }
.m-aerial-fig fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.m-aerial { position: relative; aspect-ratio: 4 / 3; background: var(--ink); overflow: hidden; }
.m-aerial > img, .m-aerial > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-aerial > img { object-fit: cover; }
.m-aerial-fig figcaption, .m-aerial-fig .m-sources { padding-left: var(--margin); }
.m-aerial-fig figcaption { margin-top: var(--space-2); }

/* Outlines: accent at 3px over a 2px paper halo; selected at 5px with a light accent tint */
.cand path.halo { fill: none; stroke: var(--outline-halo); stroke-width: 7; vector-effect: non-scaling-stroke; pointer-events: none; opacity: 0.9; }
.cand path.line { fill: rgba(58, 95, 125, 0); stroke: var(--accent); stroke-width: 3; stroke-linejoin: miter; vector-effect: non-scaling-stroke; pointer-events: visiblePainted; cursor: pointer; }
.choose input:checked + .cand path.line { stroke-width: 5; fill: rgba(58, 95, 125, 0.16); }
.choose input:checked + .cand path.halo { stroke-width: 9; }
.cand rect { fill: var(--ink); stroke: var(--outline-halo); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: visiblePainted; cursor: pointer; }
.cand text { fill: var(--ground); font-family: var(--font); font-size: 22px; font-weight: 500; pointer-events: none; }
.choose input:checked + .cand rect { fill: var(--accent); }

/* Nudge: a ground plate in the bottom-right corner of the aerial, text buttons only */
.m-nudge { position: absolute; right: 0; bottom: 0; display: flex; align-items: center; gap: 0; background: var(--ground); }
.m-nudge .t-caption { padding: 0 var(--space-2); color: var(--ink); font-weight: 500; }
.m-nudge button { height: 48px; padding: 0 var(--space-2); border: 0; border-left: 1px solid var(--grey-rule); border-radius: 0; background: var(--ground); color: var(--ink); font: inherit; font-size: var(--caption-size); line-height: var(--caption-line); cursor: pointer; }
.m-nudge button:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Attribution: the imagery line always visible, the data sources behind one disclosure */
.m-credit { display: block; margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--grey-caption); }
.m-sources { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--grey-caption); }
.m-sources summary { cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px; display: inline; }
.m-sources summary::-webkit-details-marker { display: none; }
.m-sources[open] summary { margin-bottom: 4px; display: block; }

/* The list beside the aerial */
.m-side { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: var(--space-3); }
.m-side h1 { margin: 0; }
.m-side .cand-list { border-top: 1px solid var(--ink); }
.m-more { align-self: flex-start; height: auto; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; line-height: 24px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.m-measure { width: 100%; height: var(--control-large); border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--ground); font: inherit; font-size: 18px; line-height: 24px; font-weight: 500; cursor: pointer; }
.m-measure:hover { text-decoration: underline; text-underline-offset: 4px; }
.m-measure:disabled { background: var(--ground); color: var(--grey-caption); border-color: var(--grey-rule); cursor: not-allowed; text-decoration: none; }
.m-alt { display: flex; flex-direction: column; gap: var(--space-1); padding-top: var(--space-3); border-top: 1px solid var(--grey-rule); }
.m-alt .choose-note { margin: 0; }
.m-alt a { font-size: 16px; line-height: 24px; }

/* ---------- Result ---------- */
.m-result { margin-top: var(--space-4); row-gap: var(--space-4); align-items: start; }
.m-result .m-aerial-fig { grid-column: 1 / span 7; }
.m-head { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: var(--space-3); }
.m-figure { margin: 0; font-weight: 300; font-size: var(--display-size); line-height: var(--display-line); letter-spacing: -0.015em; }
.m-figure .m-unit { font-size: var(--heading-size); }
.m-head .m-how { margin: 0; }
.m-selects { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--ink); }
.m-selects select { width: 100%; height: var(--control-height); padding: 0 var(--space-2); border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: var(--body-size); -webkit-appearance: none; appearance: none; }

/* The band slot: the same place in both states */
.m-band { min-height: 160px; padding: var(--space-3); background: var(--paper); border-top: 4px solid var(--ink); }
.m-band [data-band-state="choose"] { margin: 0; color: var(--grey-caption); }
.m-band .t-label { margin: 0; }
.m-band-value { margin: var(--space-1) 0 0; font-weight: 300; font-size: var(--heading-size); line-height: var(--heading-line); }
.m-band .t-caption { margin-top: var(--space-2); }
.m-band [data-band-state="unavailable"] { margin: 0; }
.m-facts { margin: 0; border-top: 1px solid var(--ink); }
.m-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px solid var(--grey-rule); }
.m-facts dt { font-size: var(--caption-size); line-height: var(--caption-line); color: var(--grey-caption); }
.m-facts dd { margin: 0; text-align: right; font-size: 16px; line-height: 24px; }
.m-facts input { width: 8ch; height: 40px; padding: 0 var(--space-1); border: 1px solid var(--grey-caption); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; text-align: right; -moz-appearance: textfield; }

/* The disclaimer: one step below the figure and the band, never the largest text on the page */
.m-status { margin-top: var(--space-8); }
.m-status p { grid-column: 1 / span 10; margin: 0; font-weight: 300; font-size: var(--statement-size); line-height: var(--statement-line); }
.m-bench { margin-top: var(--space-7); }

/* Next step: four route cards */
.m-next { margin-top: var(--space-8); }
.m-next > h2 { margin-bottom: var(--space-4); }
.m-next .routes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); border: 0; }
.m-next .routes > li + li { border-left: 0; }
.m-next .route, .m-next .routes > li:first-child .route { min-height: 208px; padding: var(--space-3); background: var(--paper); border-top: 4px solid var(--ink); }
.m-next .route[aria-expanded="true"] { background: var(--ink); color: var(--ground); }
.m-next .route[aria-expanded="true"] > span { color: var(--ground); }
.m-next .form-panel { margin-top: var(--gutter); padding: var(--space-5) var(--space-5); background: var(--paper); border-bottom: 0; }
.m-next .form-panel .grid > .intro { grid-column: 1 / span 3; }
.m-next .form-panel .grid > .form { grid-column: 5 / span 8; }
.m-next .form-panel .field input[type="text"], .m-next .form-panel .field input[type="email"], .m-next .form-panel .field input[type="tel"], .m-next .form-panel .field select { background: var(--paper); }
.m-next .form-panel .consent { padding-top: var(--space-2); border-top: 1px solid var(--grey-rule); }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .m-hero-panels { position: static; }
  .m-hero-box { grid-column: 1 / -1; }
  .m-hero-photo { height: 480px; }
  .m-aerial-fig, .m-result .m-aerial-fig { grid-column: 1 / -1; margin: 0 calc(-1 * var(--margin)); }
  .m-side, .m-head { grid-column: 1 / -1; }
  .m-next .routes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-explain .m-para, .m-explain .m-note { grid-column: 1 / -1; }
}

/* ---------- Phone ---------- */
@media (max-width: 639px) {
  :root { --control-large: 56px; }
  .m-hero-photo { height: auto; aspect-ratio: 16 / 9; }
  .m-hero-box { margin: 0 calc(-1 * var(--margin)); padding: var(--space-4) var(--margin) var(--space-5); }
  .m-hero-box::before { display: none; }
  .m-entry { margin-top: var(--space-3); }
  .m-entry-row { grid-template-columns: 1fr; gap: var(--space-1); }
  .m-entry input { border-right: 1px solid var(--ground); font-size: 18px; }
  .btn-accent-l { width: 100%; }
  .m-explain { padding-top: var(--space-6); }
  .m-explain .m-para { font-size: var(--body-size); line-height: var(--body-line); }
  .m-aerial-fig figcaption, .m-aerial-fig .m-sources { padding: 0 var(--margin); }
  .m-nudge .t-caption { display: none; }
  .m-nudge button { height: 40px; padding: 0 12px; }
  .m-figure .m-unit { font-size: var(--heading-size); }
  .m-band { min-height: 0; }
  .m-status { margin-top: var(--space-6); }
  .m-next { margin-top: var(--space-6); }
  .m-next .routes { grid-template-columns: 1fr; gap: var(--space-2); }
  .m-next .route, .m-next .routes > li:first-child .route { min-height: 0; }
  .m-next .form-panel { margin: var(--space-2) calc(-1 * var(--margin)) 0; padding: var(--space-4) var(--margin); }
}

/* ---------- Choose: fixes from review ---------- */
.m-side h1.s-title { font-size: var(--statement-size); line-height: var(--statement-line); }
.choose-form:has(#b1:checked) .cand-row[for="b1"],
.choose-form:has(#b2:checked) .cand-row[for="b2"],
.choose-form:has(#b3:checked) .cand-row[for="b3"],
.choose-form:has(#b4:checked) .cand-row[for="b4"],
.choose-form:has(#b5:checked) .cand-row[for="b5"] { padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.choose-form:has(#b1:checked) .cand-row[for="b1"] .mk-n,
.choose-form:has(#b2:checked) .cand-row[for="b2"] .mk-n,
.choose-form:has(#b3:checked) .cand-row[for="b3"] .mk-n,
.choose-form:has(#b4:checked) .cand-row[for="b4"] .mk-n,
.choose-form:has(#b5:checked) .cand-row[for="b5"] .mk-n { background: var(--ink); color: var(--ground); }
.choose-form:has(#b1:checked) .cand-row[for="b1"] .t-title,
.choose-form:has(#b2:checked) .cand-row[for="b2"] .t-title,
.choose-form:has(#b3:checked) .cand-row[for="b3"] .t-title,
.choose-form:has(#b4:checked) .cand-row[for="b4"] .t-title,
.choose-form:has(#b5:checked) .cand-row[for="b5"] .t-title { font-weight: 500; }

/* ---------- Result: the traced outline reads on a dark parapet as well as a pale roof ---------- */
.m-aerial .outline-halo { fill: none; stroke: var(--outline-halo); stroke-width: 7; vector-effect: non-scaling-stroke; opacity: 0.9; }
.m-aerial .outline { stroke-width: 4; }

/* ---------- Header: a slim bar that stays at the top on scroll ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ground); }
.site-header .bar { height: 64px; gap: var(--space-3); }
.site-header .brand img { height: 24px; }
.site-header nav ul { gap: var(--space-2); }
.site-header nav a { font-size: 13px; line-height: 20px; }
.header-call { gap: var(--space-2); }
.header-call .t-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }  /* "Call us" kept for screen readers */
.header-call .number { font-size: 16px; line-height: 24px; font-weight: 500; }
.header-call .t-caption { font-size: 13px; line-height: 20px; }
.mobile-menu { top: 65px; }
@media (max-width: 1279px) { .header-call .t-caption { display: none; } }
@media (max-width: 639px) {
  .site-header .bar { height: 56px; }
  .site-header .brand img { height: 20px; }
  .header-call { display: flex; margin-left: auto; }
  .header-call .number { font-size: 15px; }
  .mobile-menu { top: 57px; }
}

/* ---------- The mark: the R cut from the wordmark ---------- */
.f-mark { display: block; width: 32px; height: 32px; margin-bottom: var(--space-2); }
.film-play .play-mark { width: 32px; height: 32px; align-self: center; }
