/* Roofing page: opening tweaks, material switch, repair/replace fork, look-first, hand-off */

/* Opening */
.opening__plate .plate h1 { font-size: clamp(1.75rem, 5vw, 4.5rem); }
.opening__plate .plate h1 span { display: inline; }
.opening__plate .plate h1 span:first-child::after { content: ""; }
.opening__plate .plate h1 { line-height: 0.98; }
.opening__plate .plate h1 span { display: block; }
.opening__note { margin: 1rem 0 0; max-width: 30em; font-size: var(--t-body); }
.opening__note a { display: inline-block; min-height: 1.5rem; }
@media (max-width: 47.99em) {
  .opening { min-height: 28rem; }
  .opening__pic { align-self: end; }
}

/* Material switch: head */
.mats__head { margin-bottom: 0; }
.mats__head .lead { margin-bottom: 0; }

/* Tabs: scalloped Anton, hidden without script (both panels then show) */
.mats__tabs { display: none; }
html.js .mats__tabs {
  display: flex; gap: 0.75rem; margin-top: 1.25rem; padding: 0.25rem var(--inset) 0;
  overflow-x: auto; scrollbar-width: none;
}
html.js .mats__tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; min-height: 3rem; padding: 0.55rem 1.4rem calc(var(--sc) + 0.4rem);
  font-family: var(--display); font-size: 1.35rem; line-height: 1.1;
  background: transparent; color: var(--deep);
  border: 0.1875rem solid var(--deep); border-bottom: 0;
}
.tab[aria-selected="true"] { background: var(--deep); color: var(--pale); }
.tab:hover { text-decoration: underline; text-decoration-thickness: 0.08em; }
.tab:focus-visible { outline-offset: -0.45rem; }

/* Stage: both panels share one cell, so nothing jumps; the hidden one is visibility:hidden */
.mats__stage { display: grid; margin-top: 1.25rem; }
.mat { display: grid; gap: var(--gap); align-items: start; }
.mat + .mat { margin-top: 2.5rem; }
html.js .mat + .mat { margin-top: 0; }
html.js .mat { grid-area: 1 / 1; }
html.js .mat:not(.is-on) { visibility: hidden; }
.mat__text h3 { margin-bottom: 0.5rem; }
.mat__text .rows > div { grid-template-columns: minmax(6.5rem, 0.8fr) 2fr; }
.mat__text dd a { display: flex; align-items: center; min-height: 2.75rem; width: fit-content; }
.mat__pic img { aspect-ratio: 3 / 2; height: auto; }
.mat__pic figcaption { padding-inline: var(--inset); }
/* Desk: the rules run right up to the picture's left edge - one shared line, no gutter between */
@media (min-width: 48em) {
  .mat { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 0; }
  .mat__text { padding-right: 0; }
  .mat__text .rows > div { padding-right: var(--gap); }
  .mat__pic figcaption { padding-left: 0; }
}

/* Repair or replace: wide repair column, narrow replacement column; the key stands on the narrow column's left edge */
.fork__grid { display: grid; gap: 1.5rem; }
.fork__grid h2 { margin-bottom: 0; }
.fork__key { width: 9rem; margin: 0.4rem 0 0.4rem; justify-self: start; }
.fork__col { border-top: var(--rule); padding-top: 0.5rem; }
.fork__col h3 { margin-bottom: 0.2em; }
.fork__col p { max-width: 32em; margin-bottom: 0; }
.fork__col--main p { font-size: calc(var(--t-body) * 1.2); line-height: 1.45; max-width: 36em; }
@media (min-width: 48em) {
  .fork__grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: calc(var(--gap) * 2); row-gap: 1.5rem;
  }
  .fork__grid h2, .fork__key { align-self: end; }
  .fork__col { align-self: start; }
}

/* Look first */
.look .lead { margin-bottom: 0.7em; }
.look .band__in > p:not(.lead) { max-width: 32em; }
.look .band__pic img { aspect-ratio: 4 / 3; height: auto; max-height: 30rem; }
@media (max-width: 47.99em) { .look .band__pic { order: 2; } }

/* Hand-off: text left; the call button and the storm link stacked in their own column, a rule between */
.call { display: grid; gap: 1.25rem; align-items: end; }
.call h2 { margin-bottom: 0.3em; }
.call__text { max-width: 34em; margin-bottom: 0; }
.call__text a { display: inline-block; min-height: 1.5rem; }
.call__acts { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.call__next { align-self: stretch; border-top: var(--rule); padding-top: 0.5rem; }
@media (min-width: 48em) {
  .call { grid-template-columns: minmax(0, 1.5fr) minmax(15rem, 1fr); gap: calc(var(--gap) * 2); }
}
