/* EPO-154: alignment follows the intended section layout. */
body.df-theme-urban-flight .dfcr-section-head--center {
  margin-inline: auto;
  text-align: center;
}
body.df-theme-urban-flight .dfcr-section-head--center > :is(h1,h2,h3,p) {
  margin-inline: auto !important;
}
body.df-theme-urban-flight .dfcr-section-head--center > :is(h1,h2,h3) {
  max-width: 28ch;
  text-wrap: balance;
}
/* Short cards must not distribute a tall neighbour's empty space between words. */
body.df-theme-urban-flight .dfcr-card {
  align-content: start;
}
body.df-theme-urban-flight .df-course-guide-course-grid {
  align-items: start;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr));
}
body.df-theme-urban-flight .df-course-guide-card {
  min-width: 0;
  min-height: 0;
  height: auto;
}
body.df-theme-urban-flight .df-course-guide-readiness .df-course-guide-detail-list {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));
  align-items:stretch;
}
@media(min-width:768px) {
  body.df-theme-urban-flight .df-course-guide-course-grid:has(> .df-course-guide-card:not(.df-course-guide-card--source-checked)) > .df-course-guide-card--source-checked {
    grid-column:1/-1;
  }
}
/* Let the existing character and callout fit the available grid track. */
body.df-theme-urban-flight .df-mascot-helper__tile {
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: anywhere;
}
body.df-theme-urban-flight .df-mascot-helper__cta {
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
}
body.df-theme-urban-flight .df-email-popup button[type="submit"] {
  background:#155f3d !important;
  color:#fff !important;
}
body.df-theme-urban-flight .df-email-popup a {
  color:#155f3d !important;
  text-decoration:underline;
}
body .site-primary-footer-inner-wrap .widget-title {
  margin-top:0;
}
/* Keep guide text within the hero's light reading area. */
@media(min-width:768px) {
  body.df-theme-urban-flight.df-route-bag-builder #content .dfcr-hero--guide > * {
    max-width:min(760px,58vw) !important;
  }
  body.df-theme-urban-flight.df-route-bag-builder #content .dfcr-hero--guide > h1 {
    max-width:min(15.5ch,720px) !important;
    font-size:clamp(3.5rem,5.4vw,5.75rem) !important;
    line-height:.98 !important;
    text-wrap:balance;
  }
}
/* Additional editorial sections use the same readable gutters as the article. */
body.df-theme-urban-flight .entry-content > .dfcr-article-section.dfseo-search-intent {
  box-sizing:border-box;
  width:100%;
  max-width:1320px;
  margin:clamp(32px,4vw,56px) auto;
  padding-inline:clamp(18px,4.2vw,60px);
}
@media(max-width:767px) {
  body.df-theme-urban-flight .df-mascot-helper {
    grid-template-columns: 76px minmax(0,1fr) !important;
    column-gap: 0;
    max-width: calc(100% - 40px) !important;
    margin-block: 36px 48px !important;
  }
  body.df-theme-urban-flight .df-mascot-helper__image {
    width: 106px !important;
  }
  body.df-theme-urban-flight .df-mascot-helper__tile {
    padding: 20px 14px 20px 24px !important;
  }
  body.df-theme-urban-flight .dfcr-product-row {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:20px 14px;
  }
  body.df-theme-urban-flight .dfcr-product-row > a {
    min-width:0;
  }
  body.df-theme-urban-flight .dfcr-product-row img {
    width:100%;
    height:auto;
    aspect-ratio:1;
    object-fit:contain;
  }
  body.df-theme-urban-flight .dfcr-product-row strong {
    display:block;
    margin-top:8px;
    font-size:14px;
    line-height:1.4;
  }
}
@media(max-width:1099px) {
  /* Keep navigation legible without a long, narrow, centred footer stack. */
  body .site-primary-footer-wrap {
    padding-block:0 !important;
  }
  body .site-primary-footer-inner-wrap.ast-builder-grid-row {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:32px 20px;
    align-items:start;
    padding-block:36px;
  }
  body .site-primary-footer-inner-wrap > .site-footer-section {
    min-width:0;
    margin:0;
    text-align:left;
    justify-content:flex-start;
  }
  body .site-primary-footer-inner-wrap > .site-footer-section-1,
  body .site-primary-footer-inner-wrap > .site-footer-section-4 {
    grid-column:1/-1;
  }
  body .site-footer .footer-widget-area-inner {
    width:100%;
    max-width:none;
    text-align:left;
    padding:0 !important;
    margin:0 !important;
  }
  body .site-footer .widget-title {
    margin:0 0 12px;
    font-size:24px;
  }
  body .site-footer .widget p:empty {
    display:none;
  }
  body .site-footer .menu a {
    display:inline-block;
    padding-block:5px;
    line-height:1.4;
    font-size:14px;
  }
  body .site-footer .site-footer-section-4 .menu {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    column-gap:20px;
  }
  body .site-footer #mailpoet_form_1 {
    padding:18px;
    max-width:480px;
    margin-inline:0;
  }
  body .site-footer #mailpoet_form_1 form.mailpoet_form {
    padding:0;
  }
  body .site-footer #mailpoet_form_1 :is(.mailpoet_text,.mailpoet_submit) {
    max-width:none;
  }
}
/* Keep each course field in one value track, rather than nesting another grid. */
body.df-theme-urban-flight .df-course-finder-card__meta .df-course-guide-meta-value {
  display:block !important;
  font-size:12px !important;
  line-height:1.4 !important;
  letter-spacing:0 !important;
}
body.df-theme-urban-flight .df-course-finder-card__meta > span {
  grid-template-columns:minmax(94px,.45fr) minmax(0,1fr);
  gap:8px;
}
body.df-theme-urban-flight .df-course-finder-card__trust strong {
  display:inline !important;
  font-size:inherit !important;
  line-height:inherit !important;
  text-transform:none !important;
  margin:0 !important;
}
body.df-theme-urban-flight .df-course-finder {
  grid-template-columns:minmax(0,1fr);
  align-items:start;
  gap:20px;
}
body.df-theme-urban-flight .df-course-finder__results {
  min-width:0;
  align-items:start;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));
}
body.df-theme-urban-flight .df-course-finder__status {
  margin:0;
}
@media(min-width:1024px) {
  body.df-theme-urban-flight .df-course-finder {
    grid-template-columns:280px minmax(0,1fr);
    column-gap:28px;
  }
  body.df-theme-urban-flight .df-course-finder__panel {
    grid-column:1;
    grid-row:1/4;
  }
  body.df-theme-urban-flight .df-course-finder > :is(.df-course-finder__status,.df-course-finder__results,.df-course-finder__empty) {
    grid-column:2;
  }
  body.df-theme-urban-flight .df-course-finder__filters {
    grid-template-columns:minmax(0,1fr);
  }
  body.df-theme-urban-flight .df-course-finder__search {
    grid-column:auto;
  }
}

@media(max-width:1099px) {
  body .site-footer :is(.widget,.widget-title,.footer-widget-area-inner) { text-align:left !important; }
}
@media(max-width:767px) {
  /* The desktop slide offset can move this narrow callout beyond the viewport. */
  body.df-theme-urban-flight .df-mascot-helper__tile { transform:none !important; }
}
body.df-theme-urban-flight .df-mascot-helper .df-mascot-helper__cta,
body.df-theme-urban-flight .df-mascot-helper .df-mascot-helper__cta:visited {
  color:#050812 !important;
}
@media(max-width:767px) {
  body.df-theme-urban-flight .df-mascot-helper__bubble {
    box-sizing:border-box;
    max-width:90px;
    padding:6px 5px;
    font-size:.625rem;
  }
}
@media(max-width:767px) {
  /* Description-free guide links do not need a full-height content card. */
  body.df-theme-urban-flight a.dfcr-card:has(> strong:last-child) { min-height:0; }
  body.df-theme-urban-flight .dfcr-card > p:empty { display:none; }
}

/* Keep the account mascot inside the panel during its entrance animation. */
@media(min-width:761px) and (max-width:1099px) {
  body.woocommerce-account .df-account-auth-helper { right:12px; width:110px; }
}
/* Opaque navigation must occupy its own space above transparent-header pages. */
@media(min-width:922px) {
  body.df-theme-urban-flight.ast-theme-transparent-header #masthead { position:relative; }
}
body.df-theme-urban-flight #content .df-mascot-helper .df-mascot-helper__cta,
body.df-theme-urban-flight #content .df-mascot-helper .df-mascot-helper__cta:visited {
  color:#050812 !important;
}
/* The legal template hides sidebars; retain the shared footer navigation. */
body.df-legal-route .site-footer .widget-area { display:block; }

/* EPO-154: scoped visual candidates, tested via addStyleTag only. */
@media (min-width: 761px) {
  body .df-tips-gallery-v1.dfseo-search-intent > .df-tips-grid-v1 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Override the accessibility stylesheet's generic !important link color only on filled CTAs. */
body.df-route-tips #content .df-tips-grid-v1 article > div > a,
body.df-route-tips #content .df-tips-grid-v1 article > div > a:visited {
  color: #ffffff !important;
}
body.df-route-tips #content .df-tips-actions-v1 > a,
body.df-route-tips #content .df-tips-actions-v1 > a:visited,
body.df-route-tips #content .df-mascot-helper__cta,
body.df-route-tips #content .df-mascot-helper__cta:visited {
  color: #050812 !important;
}
body .site-footer .df-legal-form-notice {
  color: #d8edf1;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
body .site-footer .df-legal-form-notice a,
body .site-footer .df-legal-form-notice a:visited {
  color: #d8edf1;
  text-decoration: underline;
}
/* Poster previews include instructional text; preserve the full artwork. */
body.df-route-tips #content .df-tips-grid-v1 > article > a > img {
  object-fit: contain;
  background: #050812;
}
body.df-route-tips #content .df-tips-shop-v1 p a,
body.df-route-tips #content .df-tips-shop-v1 p a:visited {
  color: #d8edf1 !important;
}
body.df-route-tips #content .df-tips-shop-v1 > a,
body.df-route-tips #content .df-tips-shop-v1 > a:visited {
  color: #050812 !important;
}
body.df-route-tips #content .df-tips-poster-wall-v2 img {
  object-fit: contain;
  background: #050812;
}
body.df-route-practice #content .dfcr-challenge-hero > .dfcr-hero-poster {
  aspect-ratio: 1;
  background: #050812;
}
body.df-route-practice #content .dfcr-challenge-hero > .dfcr-hero-poster img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1;
  object-fit: contain;
}
@media (max-width: 760px) {
  body.df-route-tips #content .df-tips-hero-v2 > .df-tips-poster-wall-v2 {
    aspect-ratio: auto;
    align-items: center;
  }
  body.df-route-tips #content .df-tips-poster-wall-v2 img {
    height: auto !important;
    aspect-ratio: 2 / 3;
  }
}
body.df-route-practice #dfcr-plan-days label > strong {
  margin-inline-end: .35em;
}
@media (max-width: 760px) {
  body.df-route-practice #content .dfcr-poster-section .dfcr-poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start;
    gap: 10px;
  }
  body.df-route-practice #content .dfcr-poster-section .dfcr-poster-grid img {
    aspect-ratio: 3 / 4;
    height: auto;
    object-fit: contain;
  }
}
body.df-route-practice #content .dfcr-challenge-hero > .dfcr-hero-poster figcaption {
  color: #d8edf1 !important;
  padding: 8px 12px;
  margin: 0;
}


/* EPO-154 candidate: restore component contrast after broad theme/link rules. */
body #content .df-editorial-related h2,
body #content .df-editorial-corrections a,
body #content .df-editorial-related__card {
  color: #fff !important;
}
body #content .df-editorial-related__card {
  background: #15394d;
  border-color: #54717f;
  border-radius: 12px;
}
body #content .df-editorial-related__card em {
  color: #c8ff3d !important;
}
body #content .df-editorial-related__card:hover,
body #content .df-editorial-related__card:focus-visible {
  background: #214b60;
  border-color: #c8ff3d;
}
body #content .df-editorial-corrections a:hover,
body #content .df-editorial-corrections a:focus-visible {
  color: #c8ff3d !important;
}
body #content .df-legal-related a {
  color: #fff !important;
}
body #content .df-legal-related a:hover,
body #content .df-legal-related a:focus-visible {
  color: #09243a !important;
  background: #c8ff3d;
}

/* The policy component supplies its own spacing; nested article/entry padding
   otherwise squeezes its mobile copy and makes the desktop heading overflow. */
body.df-editorial-policy-page #primary .ast-article-single,
body.df-editorial-policy-page #primary .entry-content {
  padding: 0 !important;
}
body.df-editorial-policy-page #content .df-editorial-policy {
  width: 100%;
  max-width: 980px;
  margin: 32px auto 48px;
  padding: 0 24px;
}
body.df-editorial-policy-page #content .df-editorial-policy__hero h1 {
  color: #fff !important;
  max-width: none;
  font-size: clamp(36px, 5vw, 64px);
  overflow-wrap: normal;
}
body.df-editorial-policy-page #content .df-editorial-policy__hero p {
  color: #edf7fa;
}
body.df-editorial-policy-page #content .df-editorial-policy__hero p:first-child {
  color: #c8ff3d !important;
}
body.df-editorial-policy-page #content .df-editorial-policy > section:not(.df-editorial-policy__hero) {
  padding: 38px 0 0;
}
body.df-editorial-policy-page #content .df-editorial-policy > section:not(.df-editorial-policy__hero) h2 {
  margin: 0 0 20px;
  font-size: 36px;
  line-height: 1.12;
}
@media (max-width: 760px) {
  body.df-editorial-policy-page #content .df-editorial-policy {
    margin: 24px auto 40px;
    padding: 0 18px;
  }
  body.df-editorial-policy-page #content .df-editorial-policy__hero {
    padding: 24px;
  }
  body.df-editorial-policy-page #content .df-editorial-policy__hero h1 {
    font-size: 36px;
  }
  body.df-editorial-policy-page #content .df-editorial-policy > section:not(.df-editorial-policy__hero) h2 {
    font-size: 30px;
  }
}

/* Match the other inquiry forms and keep consent controls beside their labels. */
body #content .df-platform-lead-form--feedback {
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
}
body #content .df-platform-lead-form--feedback label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
body #content .df-platform-lead-form--feedback input[type="checkbox"] {
  order: -1;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  appearance: auto;
}

/* Astra nests posts in .ast-row: place the archive grid on that wrapper. */
body.category #main {
  display: block;
  width: 100%;
  max-width: 1180px;
  margin: 32px auto 48px;
}
body.category #main > .ast-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}
body.category #main > .ast-row::before,
body.category #main > .ast-row::after {
  display: none;
}
body.category #main article.post {
  min-width: 0;
}
body.category #main article.post .post-content {
  padding: 22px;
}
body.category #main article.post .ast-blog-featured-section {
  width: calc(100% + 44px);
  max-width: none;
  margin: -22px -22px 20px;
}
body.category #main article.post .ast-blog-featured-section:not(:has(img)) {
  display: none;
}
body.category #main article.post .entry-title,
body.category #main article.post .entry-meta {
  margin: 0 0 16px;
  padding: 0;
  text-align: left;
}
body.category #main article.post .entry-content {
  padding: 0;
}
@media (max-width: 1099px) {
  body.category #main > .ast-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  body.category #main > .ast-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

/* EPO-154 commerce layout candidate. Product sources and primary image framing are unchanged. */
body.df-theme-commerce.single-product .summary h1.product_title {
  font-size: clamp(2rem, 3.2vw, 3rem) !important;
  line-height: 1.08 !important;
  margin-bottom: 20px !important;
  overflow-wrap: anywhere;
}
body.df-theme-commerce.single-product .woocommerce-product-gallery .flex-control-thumbs img {
  box-sizing: border-box;
  border: 2px solid transparent;
}
body.df-theme-commerce.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active {
  border-color: #087a83;
  opacity: 1;
}
body.df-theme-commerce.single-product .woocommerce-product-gallery .flex-control-thumbs img:focus-visible {
  outline: 3px solid #071421;
  outline-offset: 2px;
}
body.woocommerce-cart .cart-collaterals {
  margin-top: 24px;
}
body.woocommerce-cart .cart_totals {
  border-radius: 12px;
  overflow: hidden;
}
@media (max-width: 1023px) {
  body.df-theme-commerce.single-product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scroll-padding-inline: 4px;
    margin: 8px 0 0 !important;
    padding: 4px 3px 10px !important;
  }
  body.df-theme-commerce.single-product .woocommerce-product-gallery .flex-control-thumbs li {
    flex: 0 0 64px;
    float: none !important;
    width: 64px !important;
    margin: 0 !important;
  }
  body.df-theme-commerce.single-product .woocommerce-product-gallery .flex-control-thumbs img {
    display: block;
    width: 64px !important;
    height: 64px !important;
    object-fit: contain !important;
    cursor: pointer;
  }
}
@media (max-width: 767px) {
  body.df-theme-commerce.single-product .site-content > .ast-container {
    padding-top: 12px !important;
  }
  body.df-theme-commerce.single-product .summary.entry-summary {
    margin-top: 12px !important;
    padding: 22px !important;
  }
  body.df-theme-commerce.single-product .summary .df-product-perks {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin: 20px 0 !important;
  }
  body.df-theme-commerce.single-product .summary .df-product-perks > span {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-width: 0;
    padding: 10px 6px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    text-align: center;
  }
  body.df-theme-commerce.single-product .summary .df-product-perks svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
  }
}
/* Square's Cash App SVG is dimensionless; match the other payment marks. */
body.woocommerce-checkout #payment .wc-square-cash-app-pay-payment-gateway-icon {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  object-fit: contain;
  vertical-align: middle;
  margin-inline-start: 8px;
}
/* Keep shipping reassurance on one readable line below the complete price. */
body.df-theme-commerce.single-product .summary .ast-shipping-text {
  display: block !important;
  margin: 4px 0 14px !important;
  font-size: 14px;
  line-height: 1.45;
}
/* Keep WooPay's opt-in checkbox beside its text at every checkout width. */
body.woocommerce-checkout #payment label[for="save_user_in_woopay"] {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  padding-inline-start: 0;
  text-indent: 0 !important;
}
body.woocommerce-checkout #payment #save_user_in_woopay {
  position: static !important;
  flex: 0 0 16px;
  width: 16px !important;
  height: 16px !important;
  margin: 4px 0 0 !important;
}
body.woocommerce-checkout #payment label[for="save_user_in_woopay"] .wc-block-components-checkbox__label {
  min-width: 0;
  margin: 0;
  padding: 0;
}

/* Keep FlexSlider width responsive when its reserved aspect ratio and pixel height coexist. */
body.df-theme-commerce.single-product .woocommerce-product-gallery .flex-viewport {
  width: 100%;
}

/* Keep the shared signup dialog independent of full-page hero typography. */
body.df-theme-urban-flight .df-email-popup .df-email-popup__dialog {
  width: min(480px, 100%) !important;
  max-width: 480px !important;
  margin: 0 !important;
  max-height: calc(100vh - 32px) !important;
  max-height: calc(100dvh - 32px) !important;
  padding: 56px clamp(20px, 4vw, 32px) 24px !important;
  overflow: auto !important;
}
body.df-theme-urban-flight .df-email-popup .df-email-popup__content {
  padding: 0 !important;
  text-align: left;
}
body.df-theme-urban-flight .df-email-popup #df-email-popup-title {
  margin: 0 !important;
  max-width: 19ch !important;
  font-size: clamp(28px, 6vw, 38px) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-wrap: balance;
}
