/* Shared generated-page geometry. The domain's theme supplies type, ink and surfaces. */
body { overflow-wrap: anywhere; }
:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.header-inner { flex-wrap: wrap; row-gap: .5rem; }
.brand, .site-nav, .author-copy, .card-body, .search input { min-inline-size: 0; }
.brand { max-inline-size: 100%; }
.brand-logo img { max-inline-size: min(300px, 100%); }
.site-nav { flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; }
.site-menu { display: none; }
.crumbs { flex-wrap: wrap; align-items: baseline; }
.search input { max-inline-size: 100%; width: 0; }

.wrap.narrow, .home-feed .home-article { max-inline-size: 72ch; }
.home-feed .home-article { inline-size: 100%; min-inline-size: 0; margin-inline: auto; }
.home-feed { grid-template-columns: minmax(0, 1fr); }
body:not(.design-news):not(.design-journal) .design-home-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .75rem; margin-top: 2rem; border-bottom: 1px solid var(--line);
}
body:not(.design-news):not(.design-journal) .design-home-head .home-cta { color: var(--accent-text, var(--accent)); }
body:not(.design-news):not(.design-journal) .prose a { color: var(--accent-text, var(--accent)); }
.prose :where(div, section, form, input, select, textarea, figure, img, svg, video, audio, iframe, object, embed),
.post-head .lede :where(img, video, iframe) { max-inline-size: 100%; }
.prose :where(img, video) { height: auto; }
.prose figure:not([class]) { margin-inline: 0; }
.prose :where(iframe[src*="youtube"], iframe[src*="vimeo.com"]) { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.prose pre, .table-wrap { max-inline-size: 100%; overflow-x: auto; }
.prose :not(.table-wrap) > table, .prose > table { display: block; overflow-x: auto; }
.prose table :where(td, th) { overflow-wrap: normal; }
.prose :where(pre, .table-wrap) { overscroll-behavior-x: contain; }
.card-body:only-child { grid-column: 1 / -1; }
.card-meta, .byline, .author-role { max-inline-size: 100%; }
.sitemap-page .table-wrap { margin-block: 1.5rem 3rem; }
.sitemap-page th { white-space: nowrap; }
.sitemap-page td:first-child { min-width: 12em; }
.sitemap-page td:nth-child(2) { white-space: nowrap; }

/* Wide mastheads and balanced columns can reflow without changing any brand tokens. */
.rf-mark, .nw-wordmark { min-width: 0; max-width: 100%; }
@media (min-width: 681px) and (max-width: 1000px) {
  .rf-mast { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; }
  .rf-nav { grid-column: 1 / -1; flex-wrap: wrap; }
}
@media (max-width: 980px) {
  .post-layout-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .header-inner { align-items: flex-start; gap: .25rem; }
  .header-inner.has-menu { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; }
  .has-menu > .site-nav { display: none; }
  .site-menu { display: block; }
  .site-menu summary {
    display: flex; align-items: center; gap: .55em; min-height: 44px; padding-inline: .75em;
    list-style: none; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
  }
  .site-menu summary::-webkit-details-marker { display: none; }
  .site-menu summary::after {
    content: ''; width: .4em; height: .4em; border-right: 1px solid; border-bottom: 1px solid; transform: translateY(-.1em) rotate(45deg);
  }
  .site-menu[open] summary::after { transform: translateY(.1em) rotate(225deg); }
  .site-menu[open] { grid-column: 1 / -1; }
  .site-menu[open] summary { width: fit-content; }
  .site-menu .site-nav { flex-direction: column; align-items: stretch; gap: 0; margin-block: .5em; }
  :is(.site-nav, .nw-nav, .rf-nav) a, .home-cta, .card .read, .post-foot a {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  .pagination a, .pagination .current, .pagination .disabled { min-width: 44px; height: 44px; }
  .post-layout-grid, .post-layout-two, .post-layout-magazine, .related-grid { grid-template-columns: minmax(0, 1fr); }
  .post-layout-list .card, .post-layout-magazine .card:first-child,
  .post-layout-magazine > .card:last-child:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .card p { min-height: 0; }
  .card-body { gap: .45rem; }
  .search { width: 100%; }
  .search input, .search button { min-height: 44px; font-size: 1rem; }
  .prose { font-size: 1.0625rem; line-height: 1.72; }
  .prose > p:first-child { font-size: 1.125rem; }
  .post { padding-block: 1rem 2.75rem; }
  .post-head { margin-bottom: 1.25rem; padding-bottom: 1.25rem; }
  .crumbs { padding-top: 1.25rem; }
  .post-head h1 { font-size: clamp(1.9rem, 7.6vw, 2.65rem); }
  .blog-hero { padding-block: 2.25rem 1.5rem; }
  .post .card-meta, .author-hero .eyebrow { font-size: max(.7rem, 11px); }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card img, .read span { transition: none; }
  .card:hover, .card:hover img, .read:hover span { transform: none; }
}

/* Captured homepage wordmarks, including separate mobile artwork. */
.home-brand { display: inline-flex; align-items: center; min-inline-size: 0; max-inline-size: 100%; }
.home-brand picture { display: block; max-inline-size: 100%; background: var(--abb-brand-bg,transparent); }
.home-brand picture img { display: block; inline-size: var(--abb-brand-width); max-inline-size: 100%; block-size: auto; object-fit: contain; }
@media (max-width: 767px) {
  .home-brand picture { background: var(--abb-brand-small-bg,transparent); }
  .home-brand picture img { inline-size: var(--abb-brand-small); }
}
