/* Rủ Rê: sections as tall as what they hold.
   The design kit sizes every section to exactly one or two screens (100svh). On a taller screen than the
   1440x900 it was laid out for (a 1920x1080 monitor) that left empty bands under short content, so at the
   client's request every section below the hero takes its content's height, parted by one even padding.
   The hero (top.css) keeps the first screen. Loaded after every other stylesheet. */
main > :is(section, .section):not(.oh-hero), footer.closing {
  height: auto; min-height: 0;
  padding: 112px 0 calc(112px + var(--bar, 0px));
}
@media (max-width: 1023px) { main > :is(section, .section):not(.oh-hero), footer.closing { padding: 96px 0 calc(96px + var(--bar, 0px)); } }
@media (max-width: 639px) { main > :is(section, .section):not(.oh-hero), footer.closing { padding: 72px 0 calc(72px + var(--bar, 0px)); } }
main > :is(section, .section):not(.oh-hero) > :is(.wrap, .container), footer.closing > .wrap { height: auto; }

/* two-group sections (.g2): the groups one under the other, not one a screen */
main > :is(section, .section).g2 > :is(.wrap, .container) { display: flex; flex-direction: column; row-gap: 64px; }
main > :is(section, .section).g2 > :is(.wrap, .container) > * { align-self: stretch; }

/* the close and the footer: the big button, then the links */
footer.closing > .wrap { grid-template-rows: auto auto; row-gap: 112px; }
@media (max-width: 639px) { footer.closing > .wrap { row-gap: 72px; } }

/* frames that used to take what the screen left now keep a shape of their own */
.frame--fill { height: auto; }
/* the system's .fill blocks take flex: 1 1 0 (the rest of a fixed-height screen); with auto heights that would
   collapse them to nothing, so they take their own height */
main .fill, main .grid.fill > .frame--fill { flex: none !important; }
#kham-pha .app.ui { height: 560px; }
#an-toan .frame, #loai-keo .frame { aspect-ratio: 5 / 4; }
#thanh-pho .frame--fill { aspect-ratio: 5 / 4; }
.rr-faq-photo { aspect-ratio: 4 / 3; }
@media (max-width: 1023px) {
  #kham-pha .app.ui { height: 520px; }
  #an-toan .frame, #loai-keo .frame, #thanh-pho .frame--fill { aspect-ratio: 4 / 3; }
}
@media (max-width: 639px) {
  #kham-pha .app.ui { height: 480px; }
  #an-toan .frame, #loai-keo .frame { aspect-ratio: auto; min-height: 420px; }
  #thanh-pho .frame--fill { aspect-ratio: auto; height: 320px; }
}
