/* One container, one grid, every page. Mobile first; min-width queries only change layout. */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-space); }
/* Sections keep their own solid colors edge to edge; the gold seam below is the only separation */
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: var(--text-on-dark); }

/* Gold seam between sections and above the footer: every block in <main> after the first, the footer, and
   the footer's legal strip,
   gets a gold line and glow centered on its top edge, half in the previous block's bottom padding and half in
   its own top padding, so it never sits on text. It's the container's width and lets clicks through. New
   sections get it automatically. */
main > *,
.site-footer,
.site-footer__base { position: relative; }
main > * + *::before,
.site-footer::before,
.site-footer__base::before {
  content: "";
  position: absolute;
  top: calc(var(--seam-height) / -2);
  inset-inline: 0;
  max-width: var(--seam-width);
  height: var(--seam-height);
  margin-inline: auto;
  background: var(--seam);
  pointer-events: none;
}

/* Attention pulse and sideways scrolling (fixed 2026-11-16). The pulse's rings (components.css) grow --pulse-spread
   (20px) past their button on every side, and a ring's box counts toward how far the page can scroll. On a phone a
   full-width "Schedule a Consultation" pill has only the 16px gutter beside it, so each ring reached about 4px past
   the screen's edge and the page could be dragged sideways while the pulse played. So on phones every block that
   holds a pulsing button clips sideways at its own edge, as the hero already does for its glow. Nothing a visitor
   could see is lost (the clipped part was off the screen), up-and-down overflow is untouched (the gold seams rely
   on it), and the floating call button, being fixed to the screen, is not clipped by the footer. The phone menu, a
   scrolling panel, does the same in components.css.
   Phones only: from tablet up the gutter is wider than the rings' spread, so there is nothing to clip, and the
   rule is lifted below, because clipping a block also changes how a desktop browser smooths the text inside it
   (subpixel smoothing was lost in the profile page's closing band and footer). :where() keeps the first rule
   weaker than any block's own overflow (the heroes clip both ways at every width). */
main > :where(:has([data-pulse])) { overflow-x: clip; }
.site-footer { overflow-x: clip; }

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  gap: var(--space-4);
}
.grid > * { grid-column: 1 / -1; }

/* Cards: 1 column (4 of 4), 2 columns (4 of 8), 3 columns (4 of 12) */
.card-grid { align-items: stretch; }
.card-grid > * { grid-column: span 4; }
/* --halves: 2 columns on desktop (6 of 12). --quarters: 4 columns on desktop (3 of 12). */

.stack--tight { gap: var(--space-2); }
.stack--loose { gap: var(--space-5); }

.prose {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: var(--measure);
}
.prose ul,
.prose ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-left: var(--space-4);
}

.list-plain {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}
/* Links in a plain list (profile practice areas, bar card number, blog sidebar) get the full 44px tap target
   (link audit fix #18), as a padded inline box so a trailing "↗" stays with the text */
.list-plain a { display: inline-block; min-height: var(--tap-target); padding-block: var(--space-2); }

.btn-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 48em) {
  /* The pulse rings fit inside the wider gutter from here up: no sideways clipping (see the note above .stack) */
  main > :where(:has([data-pulse])) { overflow-x: visible; }
  .site-footer { overflow-x: visible; }
  .btn-row { flex-direction: row; flex-wrap: wrap; align-items: stretch; }
  /* Footer row 2 on tablets: the two offices side by side, then the hours, then Follow Us, each on its own row */
  .site-footer__grid > * { grid-column: span 4; }
  .site-footer__grid > .site-footer__hours,
  .site-footer__grid > .site-footer__follow { grid-column: 1 / -1; }
  /* Feature: photo in columns 1–4, text in 5–8 */
  .feature--media > .feature__media { grid-column: 1 / span 4; grid-row: 1; }
  .feature--media > .feature__body { grid-column: 5 / span 4; }
  /* Steps: number in columns 1–2, title and text in 3–8 */
  .steps .step::before { grid-column: 1 / span 2; }
  .step > .step__title,
  .step > .step__text { grid-column: 3 / span 6; }
}

@media (min-width: 64em) {
  .card-grid--halves > * { grid-column: span 6; }
  .card-grid--quarters > * { grid-column: span 3; }
  /* Feature: photo in columns 1–5, text in 7–12, highlights 2 across (3 columns each) */
  .feature--media > .feature__media { grid-column: 1 / span 5; }
  .feature--media > .feature__body { grid-column: 7 / span 6; }
  .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Steps: number 1–2, title 3–6, text 7–12 */
  .step > .step__title { grid-column: 3 / span 4; }
  .step > .step__text { grid-column: 7 / span 6; }
  /* FAQ: heading in columns 1–4, questions in 6–12 */
  .faq > .faq__head { grid-column: 1 / span 4; }
  .faq > .faq__list { grid-column: 6 / span 7; }
  .locations > .locations__offices { grid-column: span 8; }
  .locations > .locations__hours { grid-column: span 4; }
  /* Attorney profile hero: name and buttons in columns 1–7, portrait in 8–12, side by side in one row */
  .hero--profile .hero__text { grid-column: 1 / span 7; grid-row: 1; }
  .hero--profile .hero__portrait { grid-column: 8 / -1; grid-row: 1; justify-self: end; }
  /* Attorney profile biography: the main column in 1–6 and the side column (quote, photo) in 8–12; without a side
     column the main one keeps the full width (paragraphs stay at the 70ch measure) */
  .profile-bio--aside > .profile-bio__main { grid-column: 1 / span 6; }
  .profile-bio--aside > .profile-bio__aside { grid-column: 8 / -1; }
  /* Attorney profile practice areas statement: the statement in columns 1–6, what it means in 8–12 */
  .profile-areas__intro > .profile-areas__statement { grid-column: 1 / span 6; }
  .profile-areas__intro > .profile-areas__text { grid-column: 8 / -1; }
  /* Office page, 01 Visit: the address and what to know in columns 1–6, the photo and the hours in 8–12 */
  .office-visit { align-items: start; }
  .office-visit > .office-visit__main { grid-column: 1 / span 6; }
  .office-visit > .office-visit__side { grid-column: 8 / -1; }
  /* Service page opening: paragraphs in columns 1–6, the notice in 8–12 (the profile biography's split, wide
     enough at 1024px for the notice's "Call Now!" button), tops aligned */
  .service-opening__inner { align-items: start; }
  .service-opening__inner > .service-opening__text { grid-column: 1 / span 6; grid-row: 1; }
  .service-opening__inner > .service-notice { grid-column: 8 / -1; grid-row: 1; }
  /* "On this page" as a full-width bar under both (requested 2026-11-16: it hid in the right-hand column) */
  .service-opening__inner > .service-toc { grid-column: 1 / -1; grid-row: 2; }
  /* Service page "Why Work With": points in columns 1–7, the attorney's card in 9–12 */
  .service-why > .service-why__main { grid-column: 1 / span 7; }
  .service-why > .service-why__people { grid-column: 9 / -1; }
  .bio__media { grid-column: span 4; }
  .bio__media + .bio__body { grid-column: span 8; }
  .post-layout > .post { grid-column: span 8; }
  .post-layout > .post-sidebar { grid-column: span 4; }
  /* Contact page, Our Offices: the offices in columns 1–7, the hours in 9–12, tops aligned */
  .contact-visit { align-items: start; }
  .contact-visit > .contact-visit__offices { grid-column: 1 / span 7; }
  .contact-visit > .contact-visit__hours { grid-column: 9 / -1; }
  /* Footer row 2 on desktop: the principal office in columns 1–3, the hours in 4–8, the other office in 9–12 (set flush
     right), and Follow Us under the hours in 4–8 (2026-11-20: it had a row of its own), so the row is no taller than an
     office block and the hours. The offices come before the hours in the page, and the hours hold no link, so keyboard
     order is unaffected. */
  .site-footer__grid > .site-footer__office--start { grid-column: 1 / span 3; grid-row: 1 / span 2; }
  .site-footer__grid > .site-footer__hours { grid-column: 4 / span 5; grid-row: 1; }
  .site-footer__grid > .site-footer__office--end { grid-column: 9 / span 4; grid-row: 1 / span 2; }
  .site-footer__grid > .site-footer__follow { grid-column: 4 / span 5; grid-row: 2; }
  /* Footer legal strip: who is responsible in columns 1–5, the disclaimer in 7–12 */
  .site-footer__legal-grid > .site-footer__responsible { grid-column: 1 / span 5; }
  .site-footer__legal-grid > .site-footer__disclaimer { grid-column: 7 / span 6; }
}
