/* Relative type follows the reader's browser font setting. */
:root {
  font-family: "Segoe UI", system-ui, Roboto, Arial, sans-serif;
  --reading-size: 1.125rem;
  --reading-line: 1.55;
  --reading-measure: 60ch;
}

/* Limit the words per line without shrinking the surrounding cards or images. */
main :is(.hero-blurb, .hero-copy .hero-blurb, .cover-copy .lead, .cover-copy .basis, .intro-copy,
  .card-answer, .garage-intro .lead, .guide-cover .lead, .guide-cover aside p:last-child,
  .guide-landing > p:not(.kicker), .firm-cover .lead, .contact-main .lead,
  .service-card > p, .catalog-item h2 + p, .company-band p:not(.kicker),
  .consult p:not(.kicker), .order-band p, .garage-feature p:not(.kicker),
  .garage-price p, .garage-deadline, .small-note, .term span),
main :is(.content-section, .rate-panel, .contact-help, .contact-main, .paper-card,
  .side-note, .wayfinding, .garage-section, .garage-neighbor, .garage-contact)
  :is(p:not(.kicker), li:not(:has(p))) {
  font-size: var(--reading-size);
  line-height: var(--reading-line);
  max-inline-size: var(--reading-measure);
}

main :is(.cover-copy .lead, .garage-intro .lead, .hero-blurb) { max-inline-size: 48ch; }
.garage-contact :is([data-purpose-note], [data-garage-feedback]) {
  font-size: var(--reading-size);
  line-height: var(--reading-line);
  max-inline-size: var(--reading-measure);
}
.garage-section > p, .garage-checklist li {
  max-inline-size: var(--reading-measure);
}
.price-table tbody :is(th, td) { font-size: var(--reading-size); line-height: var(--reading-line); }
.calc-line span, .parcel-answer span, .catalog-rate span { font-size: 1rem; }
main :is(.on-page, .garage-nav) { gap: .2rem 1.2rem; }
main :is(h1, h2, h3), main .garage-intro h1 { letter-spacing: -.025em; }
main :is(.btn, .text-link), .crumb a { min-block-size: 44px; }
h1, h2 { text-wrap: balance; }
.garage-quick-summary { display: none; }

/* Let narrow columns shrink even when an email, a sum, or a name is long. */
:where(.shell, .service-body, .side-column, .top-line, .footer-grid) > *,
:where(.guide-cover, .paper-card, .garage-contact, .firm-identity, .contact-pair) > * {
  min-inline-size: 0;
}
.shell :is(h1, h2, h3, p, li, span, th, a, button, summary, output, dd) {
  overflow-wrap: break-word;
}
.shell :is(.btn, button, nav a, .text-link, summary, [type="radio"] + span) {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.shell a[href^="mailto:"]:not(.btn, .text-link) { overflow-wrap: anywhere; }
.shell .contact-main a[href^="mailto:"] { max-inline-size: 100%; overflow-wrap: anywhere; display: block; }
.sect-head { flex-wrap: wrap; }
.top-line nav a, .menu-toggle { white-space: nowrap; }
.home-search .btn { white-space: nowrap; }
.shell .btn { max-inline-size: 100%; }
.hero-copy { min-inline-size: 0; }
input, select { max-inline-size: 100%; }

@media (max-width: 54em) {
  .service-body, .garage-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 35em) {
  .brand { white-space: normal; min-inline-size: 0; }
  .brand-mark { flex-shrink: 0; }
  .hero-copy { width: 100%; max-width: 100%; }
  .interior h1, .garage-page .garage-intro h1 {
    font-size: clamp(2rem, calc(1.65rem + 2.4vw), 2.25rem);
    line-height: 1.1;
    letter-spacing: -.025em;
  }
  main h2, .interior h2, .garage-page .garage-section h2,
  .garage-page .garage-offer h2, .garage-contact h2 {
    font-size: clamp(1.5rem, calc(1.25rem + 1.7vw), 1.75rem);
    line-height: 1.18;
  }
  .sect-head, .hero-actions, .cover-actions { flex-wrap: wrap; }
  .sect-head .text-link { flex-shrink: 1; }
  .situation-grid, .side-column, .service-body, .company-band, .footer-grid,
  .garage-layout, .garage-fields, .garage-choices {
    grid-template-columns: minmax(0, 1fr);
  }
  .top-line .brand, .shell .btn { max-inline-size: 100%; }
  .shell .btn, .contact-pair a, .garage-contact a { white-space: normal; }
  .cover-rate {
    font-size: clamp(1.5rem, calc(1.1rem + 2.5vw), 1.9rem);
    overflow-wrap: anywhere;
  }
  .garage-prices { grid-template-columns: minmax(0, 1fr); }
  .garage-price { padding: 1rem; }
  .garage-intro .garage-quick-summary { display: block; margin-top: 1rem; }
  .garage-quick-caption { margin: 0; font-weight: 600; }
  .garage-quick-terms { margin: .55rem 0 0; font-size: var(--reading-size); line-height: var(--reading-line); }
  .garage-intro .garage-quick-prices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.75rem), 1fr));
    gap: .5rem .85rem;
    align-items: start;
    margin: .45rem 0 0;
    color: var(--ink);
  }
  .garage-quick-prices > :not([hidden]) { min-inline-size: 0; }
  .garage-quick-prices :is(dt, span) { font-size: 1rem; line-height: 1.4; }
  .garage-quick-prices :is(dd, strong) {
    display: block;
    margin: .15rem 0 0;
    font-size: 1.35rem;
    font-weight: 650;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
  }
  .garage-page :is(.garage-price p, .garage-deadline) {
    font-size: var(--reading-size);
    line-height: var(--reading-line);
  }
  .garage-price .garage-amount { font-size: 1.75rem; }
  .price-table { table-layout: fixed; }
  .price-table th:last-child { width: min(72%, 6.75rem); }
  .price-table tr > :last-child { padding-inline: .2rem; white-space: nowrap; }
}

/* Keep text space when the reader increases the browser's default font size. */
@media (max-width: 20em) {
  :root { --pad: min(1rem, 3.8vw); }
  .shell :is(.hero-copy, .cover-copy, .guide-cover, .guide-landing, .paper-card, .side-note,
    .order-band, .request-panel, .garage-intro, .garage-section, .garage-contact,
    .garage-checklist, .garage-price, .garage-neighbor, .garage-feature, .firm-cover,
    .office-note, .contact-main, .wayfinding, .consult, .situation, .document-illustration) {
    padding-inline: min(1rem, 3.5vw);
  }
  .scheme-price strong { font-size: 1.6rem; }
  .guide-cover aside { padding-inline-start: min(1rem, 3.5vw); }
  .process-list { padding-inline-start: 1.35em; }
  .process-list li { padding-inline-start: .15em; }
  .shell .btn { padding-inline: min(.9rem, 3vw); }
}
@media (max-width: 17.5em) {
  .shell :is(h1,h2,h3,p,li,th,summary) { hyphens: auto; }
  .hero h1, .interior h1, .garage-page .garage-intro h1 {
    font-size: clamp(1.2rem, 10.5vw, 2rem);
  }
  .shell :is(h2,h3), .garage-page .garage-section h2,
  .garage-page .garage-offer h2, .garage-contact h2 {
    font-size: clamp(1.18rem, 8.4vw, 1.5rem);
  }
  .shell .garage-aside { padding-inline: min(.5rem, 3vw); }
  .garage-aside .garage-section { padding-inline: 0; }
  .shell :is(.tick-list,.garage-checklist ul,.process-list,.garage-stages ol) { padding-inline-start: 0; }
  .shell :is(.tick-list,.garage-checklist ul,.process-list,.garage-stages ol) li {
    padding-inline-start: 0;
    list-style-position: inside;
  }
  .shell :is(.tick-list,.garage-checklist ul) li::before { content: none; }
  .fixed-price-note, .catalog-item > div { padding-inline: min(.5rem, 3vw); }
  .top-line { flex-wrap: wrap; }
  .shell .btn { line-height: 1.3; }
  .price-table thead {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .price-table :is(tbody, tbody tr) { display: block; }
  .price-table tbody tr { border-block-end: 1px solid var(--line); padding: .5rem 0; }
  .price-table tbody :is(th,td) { display: block; border: 0; padding: .12rem 0; text-align: start; }
  .price-table tbody tr > :last-child { width: auto; text-align: start; }
}
@media (max-width: 13em) {
  :root { --reading-size: 1rem; --pad: min(.4rem, 1.6vw); }
  .shell :is(.guide-cover, .situation) { padding-inline: min(.25rem, .6vw); }
  .shell .cover-rate { font-size: 1.25rem; }
  .garage-price h3 { font-size: 1.1rem; }
  .garage-main .garage-section { padding-inline: 0; }
  .guide-cover aside, .shell .scheme-price { padding-inline-start: .25rem; }
}

