/* Scoped to existing HF surfaces; retain each page's heading scale and artwork. */
:root { --hfq-body: clamp(1.125rem, 1.05rem + .2vw, 1.25rem); --hfq-meta: .875rem; --hfq-control: 1rem; }
:is(.hf-home,.hf-magazine,.hf-bdd,.hf-library,.hf-lab,.hf-salon,.hf-hp,.hf-ar) { font-size:var(--hfq-body); line-height:1.6; }
.hf-magazine.hf-magazine,.hf-bdd.hf-bdd {font-size:var(--hfq-body);line-height:1.6;}
.hf-magazine .hf-m-card p:not(.hf-m-kicker),.hf-magazine .hfm21-excerpt,.hf-magazine .hf-m-read[open]>p:last-child,.hf-bdd .bd-tile p,.hf-bdd .bd-model p,.hf-bdd p {font-size:var(--hfq-body);line-height:1.6;}
.hf-bdd .bd-hero .bd-intro{font-size:clamp(1.1875rem,1.65vw,1.4375rem);}
.hf-magazine .hf-m-card .hf-m-kicker,.hf-magazine .hf-m-kicker,.hf-magazine .hfm21-label,.hf-magazine .hf-m-fiction-copy p:last-child,.hf-bdd .bd-kicker,.hf-bdd .bd-post-copy .bd-kicker,.hf-bdd .bd-metrics span{font-size:var(--hfq-meta);line-height:1.45;}
.hf-magazine .hf-m-nav,.hf-magazine .hf-m-link,.hf-magazine .hf-m-archive-links,.hf-magazine .hf-m-read summary,.hf-magazine .hfm21-close,.hf-bdd .bd-details summary,.hf-bdd .bd-tile summary,.hf-bdd .bd-tile a,.hf-bdd .bd-metrics a,.hf-bdd .bd-archive,.hf-bdd .bd-hero nav{font-size:var(--hfq-control);line-height:1.5;}
.hf-magazine .hfm21-card h3,.hf-magazine .hf-m-posts .wp-block-latest-posts__post-title,.hf-magazine .hf-m-posts>li>a,.hf-bdd .bd-post h3{font-size:1.25rem;line-height:1.35;overflow-wrap:anywhere;}
.hf-magazine .hfm21-large h3{font-size:clamp(1.375rem,2.1vw,2rem);}
.hf-bdd .bd-tile p{min-height:0;}
.hf-bdd .bd-map small,.hf-bdd .bd-bars,.hf-bdd .bd-question .bd-open{font-size:.9375rem;}
.hf-library .hfl-topic p,.hf-hp .hp-roles p,.hf-salon .hs-guide-grid p{font-size:1.125rem;line-height:1.55;}
.hf-ar .hf-ar-reading .wp-block-post-content{font-size:clamp(1.125rem,1.05rem + .2vw,1.25rem);line-height:1.7;}
.hf-salon .hf-double details,.hf-salon .hf-double .hf-analysis{font-size:1.125rem;line-height:1.6;}
.hf-salon .hf-double small,.hf-lab .hf-fm001 .hf-fm-note,.hf-lab .hf-fm001 cite{font-size:1rem;line-height:1.5;}
.hf-lab .hf-fm001 details,.hf-lab .hf-fm001 .hf-fm-bar-row p,.hf-lab .hf-fm001 .hf-fm-option span:last-child{font-size:1.0625rem;line-height:1.55;}
:is(.hf-home,.hf-magazine,.hf-bdd,.hf-library,.hf-lab,.hf-salon,.hf-hp,.hf-ar) :is(button,input,select,textarea){font-size:1rem;}
:is(.hf-home,.hf-magazine,.hf-bdd,.hf-library,.hf-lab,.hf-salon,.hf-hp,.hf-ar) :is(a,button,summary,input,select,textarea):focus-visible{outline:2px solid currentColor;outline-offset:3px;}
:is(.hf-home,.hf-magazine,.hf-bdd,.hf-library,.hf-lab,.hf-salon,.hf-hp,.hf-ar) :is(button,input,select){min-height:44px;max-width:100%;}
/* Only remove the gap between HF page content and shared footer, not all WP block gaps. */
.wp-site-blocks:has(:is(.hf-home,.hf-magazine,.hf-bdd,.hf-library,.hf-lab,.hf-salon,.hf-hp,.hf-ar)) > footer.wp-block-template-part{margin-block-start:0;}
/* Narrower research tiles need space for enlarged text. */
@media (min-width: 701px) and (max-width: 1250px){.hf-bdd .bd-tiles{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width:700px){.hf-bdd .bd-tiles{grid-template-columns:1fr;}.hf-magazine .hf-m-number h3{white-space:normal;overflow-wrap:anywhere;}.hf-magazine .hf-m-experiment h3{white-space:normal;}.hf-library .hfl-terms{grid-template-columns:repeat(2,minmax(0,1fr));}.hf-bdd .bd-question summary{flex-wrap:wrap;}}
@media (max-width:380px){.hf-library .hfl-terms{grid-template-columns:1fr;}}

/* 1.0.1 — mobile quality; leave desktop and working game layouts intact. */
@media (max-width: 780px) {
  /* Full-width BDD sections must include the theme's root gutters. */
  .hf-bdd.alignfull {
    box-sizing: border-box;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
  }
  .hf-bdd .bd-wrap {max-width: calc(100% - 32px); min-width: 0;}
  .hf-bdd .bd-wrap > *, .hf-bdd .bd-map > *, .hf-bdd .bd-model > *, .hf-bdd .bd-metrics > * {min-width: 0;}
  .hf-bdd .bd-observe {grid-template-columns: minmax(0,1fr);}
  .hf-bdd .bd-observe > .bd-metrics {grid-column: 1; grid-template-columns: minmax(0,1fr);}
  .hf-bdd .bd-range {grid-template-columns: minmax(0,1fr) auto;}
  .hf-bdd .bd-range input {min-width: 0; max-width: 100%;}
  .hf-bdd .bd-map {grid-template-columns: repeat(2,minmax(0,1fr));}
  /* Editorial lead cards: landscape image above readable text. */
  .hf-magazine .hfm21-perspectives .hfm21-card {flex-direction: column; min-height: 0;}
  .hf-magazine .hfm21-perspectives .hfm21-card .hfm21-image {flex: none; width: 100%; aspect-ratio: 16/9;}
  .hf-magazine .hfm21-perspectives .hfm21-copy {padding: 16px 16px 34px;}
  .hf-magazine .hfm21-perspectives .hfm21-card h3,
  .hf-magazine .hfm21-perspectives .hfm21-card h3 a {font-size: 1.25rem !important; font-weight: 750 !important; line-height: 1.3 !important;}
  /* Keep compact archive/think-tank cards horizontal even below 430px. */
  .hf-magazine .hfm21-think .hfm21-card,
  .hf-magazine .hfm21-archive-grid .hfm21-card {flex-direction: row;}
  .hf-magazine :is(.hfm21-think,.hfm21-archive-grid) .hfm21-card .hfm21-image {flex: 0 0 32%; aspect-ratio: auto;}
  .hf-magazine .hfm21-think .hfm21-card h3,
  .hf-magazine .hfm21-think .hfm21-card h3 a {font-size: 1.0625rem !important; font-weight: 700 !important; line-height: 1.35 !important;}
  /* WordPress mobile menu only while open. */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {font-size: 1.125rem; line-height: 1.4; min-height: 44px; display: flex; align-items: center; padding-block: 8px; box-sizing: border-box;}
}
