/* One navigation and footer rhythm across editorial and marketplace pages. */
html[data-theme] .site-header { background:var(--theme-surface); }
html[data-theme] :is(.main-nav,.directory-main-nav)>a {
  padding:8px 10px;
  border-radius:12px;
  line-height:1.5;
}
html[data-theme] :is(.main-nav,.directory-main-nav)>a:hover,
html[data-theme] :is(.main-nav,.directory-main-nav)>a[aria-current] {
  background:var(--theme-soft);
  color:var(--theme-accent);
}
html[data-theme] :is(.mobile-menu,.directory-language nav) {
  max-width:calc(100vw - 28px);
  max-height:min(65dvh,480px);
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
html[data-theme] .mobile-menu a[aria-current] { background:var(--theme-soft); color:var(--theme-accent); }
html[data-theme] .directory-language nav { width:max-content; min-width:190px; }
html[data-theme] .directory-language nav a { white-space:normal; overflow-wrap:anywhere; }
html[data-theme] .directory-country-control { border-radius:14px; min-width:0; }
html[data-theme] .site-footer .wrap { min-width:0; }
html[data-theme] :is(.footer-top,.footer-links,.footer-bottom,.directory-footer-top,.directory-legal-links) { min-width:0; }
html[data-theme] :is(.footer-links,.directory-legal-links) a {
  min-height:44px;
  line-height:1.65;
  overflow-wrap:anywhere;
}
html[data-theme] .site-footer a[aria-current] { color:var(--theme-accent); text-decoration:underline; text-underline-offset:5px; }
html[data-theme] :is(.footer-bottom,.directory-footer) p { overflow-wrap:anywhere; }
html[data-theme] :is(.offer-brand-fallback,.directory-card-brand>span:not(.provider-logo)) {
  display:flex; align-items:center; width:192px; max-width:100%; min-height:64px;
  color:var(--theme-ink); font-size:21px; font-weight:700; line-height:1.25; overflow-wrap:anywhere;
}
@media(min-width:901px) {
  html[data-theme] .main-nav { gap:8px; }
}
@media(max-width:700px) {
  html[data-theme] .directory-header-inner {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:"brand menu" "country language";
    gap:8px 12px;
    padding-block:12px;
  }
  html[data-theme] .directory-header-inner>.brand { grid-area:brand; min-width:0; }
  html[data-theme] .directory-header-inner>.directory-mobile-menu { grid-area:menu; justify-self:end; margin:0; }
  html[data-theme] .directory-header-inner>.directory-country-control {
    grid-area:country; width:100%; padding:9px 12px;
    white-space:normal; overflow-wrap:anywhere; line-height:1.45;
    font-size:14px; background:var(--theme-card-soft);
  }
  html[data-theme] .directory-header-inner>.directory-language:not(.directory-mobile-menu) {
    grid-area:language; justify-self:end; margin:0;
  }
  html[data-theme] .directory-header-inner .directory-language summary { min-height:44px; font-size:14px; }
  html[data-theme] .directory-mobile-menu nav { min-width:240px; }
  html[data-theme] .directory-footer-top { margin-bottom:18px; }
  html[data-theme] .directory-footer-top p { margin-top:14px; }
  html[data-theme] .directory-footer-top .directory-contact { display:inline-flex; align-items:center; min-height:44px; }
  html[data-theme] .directory-legal-links { display:grid; grid-template-columns:1fr; gap:3px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
}
/* A tablet menu stays at the right edge, including long language labels. */
@media(min-width:701px) and (max-width:1100px) {
  html[data-theme] .directory-header-inner>.brand { order:0; }
  html[data-theme] .directory-header-inner>.directory-country-control { order:1; }
  html[data-theme] .directory-header-inner>.directory-language:not(.directory-mobile-menu) { order:2; }
  html[data-theme] .directory-header-inner>.directory-mobile-menu { order:3; margin-left:auto; }
}
